page load/post back

R

rjl

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.
 
T

Tasos Vogiatzoglou

Response.Write("<script>window.location.href =
'"+Page.Request.Path+"';</script>")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top