Last post Aug 27, 2007 04:52 PM by jfmccarthy
Aug 27, 2007 03:00 PM|neojapanese1|LINK
this is my .vb code... redirect is not working.. the page just sits there..does not goto new page.( page does exist i checked)
how can i goto a new page from code behind?
Aug 27, 2007 03:22 PM|pkellner|LINK
is correct. I wonder if the stuff above is causing issues and you are never getting to the redirect line? can you try it without the other stuff?
Aug 27, 2007 03:27 PM|neojapanese1|LINK
i need the other suff.. it makes a report that Response.Redirect("http://omg/HTMLPage.htm",
True points to
but it just sits there ...again its the code behind
Aug 27, 2007 03:41 PM|pkellner|LINK
sitting there might be throwing an exception that is not caught. can you run it in debug mode and check all the options to stop on excepitons?
check this article on how to do that:
have you tested to see if response.redirect is workign at all? thiat is change it to go to some known web site.
Aug 27, 2007 03:58 PM|neojapanese1|LINK
thanks. it works
also how do you do a response.redirect that opens a new page and not take over the current page?
Aug 27, 2007 04:15 PM|pkellner|LINK
not sure what you mean.
Response.redirect causes a new request
Server.Transfer continues on the same request but starts the processing again.
Aug 27, 2007 04:52 PM|jfmccarthy|LINK
Here's a way you can do it with js.
Dim Script As New System.Text.StringBuilder
ClientScript.RegisterStartupScript(GetType(String), "startUp", Script.ToString())