void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
Exception ex = Server.GetLastError();
System.Diagnostics.StackTrace trace = new System.Diagnostics.StackTrace(ex, true);
System.Diagnostics.StackFrame fm = new System.Diagnostics.StackFrame(true);
string sline = trace.GetFrame(trace.FrameCount - 1).GetFileLineNumber().ToString();
}