Click here to Skip to main content
15,897,519 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to set ContentPlaceHolder to apply css styleshet(css file)? Pin
Abhijit Jana30-Jul-08 20:29
professionalAbhijit Jana30-Jul-08 20:29 
QuestionDateTime Property in CompositeControl Pin
dadda_mac30-Jul-08 11:19
dadda_mac30-Jul-08 11:19 
QuestionAJAX tab control returning to the first tab after postback. Pin
Steve Holdorf30-Jul-08 7:13
Steve Holdorf30-Jul-08 7:13 
QuestionReport Date and Time Default Pin
macca2430-Jul-08 5:16
macca2430-Jul-08 5:16 
Questionclient side code to update field (javascript) Pin
ferronrsmith30-Jul-08 5:08
ferronrsmith30-Jul-08 5:08 
AnswerRe: client side code to update field (javascript) Pin
Yusuf30-Jul-08 7:13
Yusuf30-Jul-08 7:13 
Questiongridview and popup Pin
Harikrk30-Jul-08 4:09
Harikrk30-Jul-08 4:09 
QuestionGlobal.asax issue Pin
markymark8230-Jul-08 3:25
markymark8230-Jul-08 3:25 
Hey all,

Am trying to use the global.asax file to handle any unhandled exceptions.

I want it to do 2 things, log the error to a text file from a class and redirect the user to an error page.

I'm sure I've done it before, but can't find my old code. This is what I'm using now:

void Application_Error(object sender, EventArgs e) 
    {
        Exception ex = Server.GetLastError().GetBaseException();
        string errStr = "Message: - " + ex.Message.ToString() + ", Source: - " + ex.Source.ToString();
        ErrorLogger.WriteErrorToFile(errStr);
        
        Response.Redirect("~/Error.aspx");
    }


The event fires, but when I call my class it ignores that and the redirect and shows the original error on the page. If I take out the class call it does redirect, but I want a log of what happened. (the class writes the error to a text file using a streamwriter).

Anyone have an inkling as to why this isn't working?

The global files being generated by VS2005 for .net 2.0 if that helps

thanks in advance

Mark
AnswerRe: Global.asax issue Pin
ElSpinos30-Jul-08 3:39
ElSpinos30-Jul-08 3:39 
GeneralRe: Global.asax issue Pin
markymark8230-Jul-08 4:28
markymark8230-Jul-08 4:28 
Questioncreating new control in code behind Pin
eyeseetee30-Jul-08 2:34
eyeseetee30-Jul-08 2:34 
AnswerRe: creating new control in code behind Pin
windhopper30-Jul-08 2:39
windhopper30-Jul-08 2:39 
AnswerRe: creating new control in code behind Pin
namn30-Jul-08 2:55
namn30-Jul-08 2:55 
AnswerRe: creating new control in code behind Pin
eyeseetee30-Jul-08 3:10
eyeseetee30-Jul-08 3:10 
AnswerRe: creating new control in code behind Pin
Anudeep Jaiswal31-Jul-08 1:39
Anudeep Jaiswal31-Jul-08 1:39 
QuestionProblem with GridView updating all records in database Pin
Dannyrod30-Jul-08 2:23
Dannyrod30-Jul-08 2:23 
AnswerRe: Problem with GridView updating all records in database Pin
Dannyrod30-Jul-08 2:57
Dannyrod30-Jul-08 2:57 
GeneralRe: Problem with GridView updating all records in database Pin
Dannyrod4-Aug-08 3:48
Dannyrod4-Aug-08 3:48 
QuestionUnable to connect to an asp.net 2.0 using IP address with it is possible to connect using localHost [modified] Pin
Hassan Amaar30-Jul-08 2:04
Hassan Amaar30-Jul-08 2:04 
AnswerRe: Unable to connect to an asp.net 2.0 using IP address with it is possible to connect using localHost Pin
dadda_mac30-Jul-08 11:27
dadda_mac30-Jul-08 11:27 
QuestionJavascript implementation Pin
windhopper30-Jul-08 1:53
windhopper30-Jul-08 1:53 
Questiondisplaying user controls on form Pin
shruti tupkari30-Jul-08 1:46
shruti tupkari30-Jul-08 1:46 
QuestionImage display problem on crystal report in asp.net page Pin
Nagraj Naik30-Jul-08 1:26
Nagraj Naik30-Jul-08 1:26 
AnswerRe: Image display problem on crystal report in asp.net page Pin
azizogluali221-Dec-09 22:44
azizogluali221-Dec-09 22:44 
AnswerRe: Image display problem on crystal report in asp.net page Pin
Debashree257-Apr-10 23:19
Debashree257-Apr-10 23:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.