Force a complete reload of a page.

  • Thread starter Thread starter UJ
  • Start date Start date
U

UJ

Is there any way I can have a page reload itself where it will completely
reload from scratch. I have a condition where a person click a button and
the easiest way to handle it would be to have the button do the DB stuff it
needs to do and then load the page from scratch - not post back.

I've tried putting in a server.transfer in the routine that does the button
click but it seems to get into an infinite loop.

TIA - Jeff.
 
Hey Jeff,
Just create a javascript function to refresh the page. Then just add
that function to the asp.net button using
'Btn.Attributes.Add("onclick","your js function name")

Thanks
 
Actually I do a response.redirect to itself and it works great.

Thanks anyway.

Eliyahu Goldin said:
And the javascript will be

location.reload(true);

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

Hey Jeff,
Just create a javascript function to refresh the page. Then just add
that function to the asp.net button using
'Btn.Attributes.Add("onclick","your js function name")

Thanks
 

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

Back
Top