Hi All
I am using 3.5 framework and Sql server 2005.I am having few doubts regarding exception handling.
I have used try and catch in all methods.In this case if exception occurs ,it swallows the problem and starts excecuting without any problem.But this should not be the same in all cases.
I want to show the error page:
* if there is any problem in connection;
* if session Expires.
* if file not found.
Now I have used as follows:
protected void imgbntOK_Click(object sender, ImageClickEventArgs e)
{
try
{
//Coding
}
catch (System.Data.SqlClient.SqlException ex)
{
WriteLog.writeLog(ex, this);
Server.Transfer("ErrorPage.aspx");
}
catch (Exception ex)
{
WriteLog.writeLog(ex,this);
...
Go to the complete details ...