K
Kerri
Hi,
I have do some Redirects in my applitcaion.
For example, when the use rhas logged in successfully I
redirect them to a different page.
In my Redirect all I was doing was a..
Response.Redirect("SomePage.aspx")
When I used above I got below error.
2) Exception Information
*********************************************
Exception Type: System.Threading.ThreadAbortException
ExceptionState:
System.Web.HttpApplication+CancelModuleException
Message: Thread was being aborted.
TargetSite: Void AbortInternal()
HelpLink: NULL
Source: mscorlib
StackTrace Information
*********************************************
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean
endResponse)
at System.Web.HttpResponse.Redirect(String url)
I have now changed all my Redirects to be..
Response.Redirect("MyPage.aspx", False)
I use False everywhere as I don't want to ever end the
execution of my page.
I have 2 questions-:
(i) Why was I getting above error. Do I have to pass in a
boolean also to my Response.Redirect?
(ii) When would I use True. Surely I will never want to
finish executing the page I am on so it will always be
False???
Any advice on this is much appreciated.
I have do some Redirects in my applitcaion.
For example, when the use rhas logged in successfully I
redirect them to a different page.
In my Redirect all I was doing was a..
Response.Redirect("SomePage.aspx")
When I used above I got below error.
2) Exception Information
*********************************************
Exception Type: System.Threading.ThreadAbortException
ExceptionState:
System.Web.HttpApplication+CancelModuleException
Message: Thread was being aborted.
TargetSite: Void AbortInternal()
HelpLink: NULL
Source: mscorlib
StackTrace Information
*********************************************
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean
endResponse)
at System.Web.HttpResponse.Redirect(String url)
I have now changed all my Redirects to be..
Response.Redirect("MyPage.aspx", False)
I use False everywhere as I don't want to ever end the
execution of my page.
I have 2 questions-:
(i) Why was I getting above error. Do I have to pass in a
boolean also to my Response.Redirect?
(ii) When would I use True. Surely I will never want to
finish executing the page I am on so it will always be
False???
Any advice on this is much appreciated.