Taking print screen of error page in CATCH block
-
hi, currently i m using asp.net 2.0 with c#. here i always redirect to an page while error occurs(in catch block). but i need to know what exactly the user enter the data(to check the error). so if error occurs, then i like to take a screen shot of the page and store inside some folder(say, errorFolder). how to accomplish. plz help me - KARAN
-
hi, currently i m using asp.net 2.0 with c#. here i always redirect to an page while error occurs(in catch block). but i need to know what exactly the user enter the data(to check the error). so if error occurs, then i like to take a screen shot of the page and store inside some folder(say, errorFolder). how to accomplish. plz help me - KARAN
First of, I don't know if this is possible, but think about this, user enters some thing into the form then hits enter, off goes the page to be processed, then ooops, you trip, how in the world are you going to take the screen shot of the user display from the server? You need something on the client, don't you? Since you indicated you are catching ( and possibly logging ) the exception that may give you a clue. If you need more info, you can log user inputs as well. Since you know your form get the user inputs and don't forget input validation.
Yusuf May I help you?
-
hi, currently i m using asp.net 2.0 with c#. here i always redirect to an page while error occurs(in catch block). but i need to know what exactly the user enter the data(to check the error). so if error occurs, then i like to take a screen shot of the page and store inside some folder(say, errorFolder). how to accomplish. plz help me - KARAN
You do not need to take print screen for the same. You can store exception in session and then use afterward to determine the cause of error. Like,
catch(Exception e)
{
Session["Error"]=e;
Response.Redirect("Error.aspx");
}HTH
Jinal Desai - LIVE Experience is mother of sage....
-
You do not need to take print screen for the same. You can store exception in session and then use afterward to determine the cause of error. Like,
catch(Exception e)
{
Session["Error"]=e;
Response.Redirect("Error.aspx");
}HTH
Jinal Desai - LIVE Experience is mother of sage....
-
thanks jinal, currently i m doing the same. to put it more clear i got an error message "Input string was not in a correct format". this error i can fetch. but i dont know what happened. right?