I have a default.aspx page that sometimes will cause an exception that gets caught in the Global.asax file. How do I send data back to my default.aspx page to change the HTML output without doing a page refresh? Is that possible?
you will have to implement a try catch and then detect the error and take steps accordingly
so suppose you know in which line you have an error.
try
{
//error prone code
}
catch
{
reponse.write("error");
response.End()
}
doing this you will catch the error and it wont be caught in the global.asax file and the "error"
string would be sent back as response to the user
*NOTE - this is just an example and th estructure of the code might differ widely depending upon the type of request GET
OR POST
or even if thats and AJAX
based request
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.