Groups | Blog | Home
all groups > asp.net > december 2005 >

asp.net : page load/post back


rjl
12/20/2005 11:32:18 PM
I have a routine when a page loads it runs through a bunch of stuff
then I have a method to check something. if this thig I am checking is
false, I want to reload the same page, if it is true, then redirect. I
have the redirect working, but how can I cause my page to reload:

if (true){
//redirect
} else
{
// I need this to cause a post back as I have things on viewstate
}

thanks for any help.
Tasos Vogiatzoglou
12/21/2005 1:01:26 AM
Response.Write("<script>window.location.href =
'"+Page.Request.Path+"';</script>")
rjl
12/21/2005 5:44:14 AM
Thanks, will this also run on_load command as well?


[quoted text, click to view]
Tasos Vogiatzoglou
1/5/2006 12:56:10 AM
The page will be reloaded (in fact you re-request the page) so yes.
AddThis Social Bookmark Button