Response.redirect
-
Can someone please tell me what is wrong with this code in C# have 2 web pages: page A and PageB in page_load event for pageA I want the page to assign a value into a session variable and redirects to pageB, like this: PageA Session["Refid"]=1; Respone.Redirect("pageb?refid="+ Session["Refid"]); . When I step run my codebehind by pressing F10, I notice it goes to the catch Exception part of my try...catch event and still redirects to pageB which shoudn't be. I believe once an error is raised it should print the error message instead of redirecting to pageB. can someone help me out. Thanks
-
Can someone please tell me what is wrong with this code in C# have 2 web pages: page A and PageB in page_load event for pageA I want the page to assign a value into a session variable and redirects to pageB, like this: PageA Session["Refid"]=1; Respone.Redirect("pageb?refid="+ Session["Refid"]); . When I step run my codebehind by pressing F10, I notice it goes to the catch Exception part of my try...catch event and still redirects to pageB which shoudn't be. I believe once an error is raised it should print the error message instead of redirecting to pageB. can someone help me out. Thanks
What is the exception ?
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
Can someone please tell me what is wrong with this code in C# have 2 web pages: page A and PageB in page_load event for pageA I want the page to assign a value into a session variable and redirects to pageB, like this: PageA Session["Refid"]=1; Respone.Redirect("pageb?refid="+ Session["Refid"]); . When I step run my codebehind by pressing F10, I notice it goes to the catch Exception part of my try...catch event and still redirects to pageB which shoudn't be. I believe once an error is raised it should print the error message instead of redirecting to pageB. can someone help me out. Thanks
Plz use this........ Response.Redirect(url, False)
Parwej Back...............DON of Developer....... Parwej Ahamad g_parwez@rediffmail.com
-
What is the exception ?
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
it doesn't print out any exception instead. I just taught something is wrong bcos when I comment that part and step run my codes it runs (without going to the next page) and does not go the catch exception segement. when you remove the comment and step run the program again, when it gets to the response.redirect, it jumps straight to the catch exception segment after which it redirects to pageB. if you can give me an example that works I don't mind. thanks for taking out time to look at my issues. expect to get more clues from you. thanks.
-
Can someone please tell me what is wrong with this code in C# have 2 web pages: page A and PageB in page_load event for pageA I want the page to assign a value into a session variable and redirects to pageB, like this: PageA Session["Refid"]=1; Respone.Redirect("pageb?refid="+ Session["Refid"]); . When I step run my codebehind by pressing F10, I notice it goes to the catch Exception part of my try...catch event and still redirects to pageB which shoudn't be. I believe once an error is raised it should print the error message instead of redirecting to pageB. can someone help me out. Thanks
hi acodman, I think that response.redirect work even for most exceptions. try putting the aspx page extention and convert the session to string Respone.Redirect("pageb.aspx?refid="+ Session["Refid"].ToString() ); i think this should work
-
What is the exception ?
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
Thread abort like...........
Parwej Back...............DON of Developer....... Parwej Ahamad g_parwez@rediffmail.com
-
hi acodman, I think that response.redirect work even for most exceptions. try putting the aspx page extention and convert the session to string Respone.Redirect("pageb.aspx?refid="+ Session["Refid"].ToString() ); i think this should work
-
always cast ur data before u use it.. Ajay has send the right thing..
Respone.Redirect("pageb.aspx?refid="+ Session["Refid"].ToString() );
-
hi acodman, I think that response.redirect work even for most exceptions. try putting the aspx page extention and convert the session to string Respone.Redirect("pageb.aspx?refid="+ Session["Refid"].ToString() ); i think this should work