Response.Redirect is used to direct the web page somewhere
Request.ServerVariable["SCRIPT_NAME"] is a Server Variable that holds the
path used to access the web page
eg /WebApplication1/WebForm1.aspx
the / Forces it to go to the root directory thus it will reload itself
Response.Redirect(Request.ServerVariables["SCRIPT_NAME"]);
return;
The above code forces a page to reloads itself. Just be careful where you
put it otherwise you will end up in a never ending loop ;)
As a general rule you should also put a return; right after the code so no
other code accidentally gets executed.
Hope this helps.
This posting is provided as is.
"Simon Harvey" <si**********@the-web-works.co.uk> wrote in message
news:OT****************@TK2MSFTNGP11.phx.gbl...
HI all,
Does anyone know how I can make a page refresh itself programatically if a
given event is fired.
I thought there would be some method like doPostBack() or something but I
can't see anything like that
Thanks
All
Simon