0

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?

cdub
  • 24,555
  • 57
  • 174
  • 303

1 Answers1

0

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

Parv Sharma
  • 12,581
  • 4
  • 48
  • 80