By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,122 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Force a complete reload of a page.

P: n/a
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.
Jul 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

UJ wrote:
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.
Jul 12 '06 #2

P: n/a
And the javascript will be

location.reload(true);

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

<ma**********@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
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

UJ wrote:
>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.

Jul 13 '06 #3

P: n/a
UJ
Actually I do a response.redirect to itself and it works great.

Thanks anyway.

"Eliyahu Goldin" <re*************@monarchmed.comwrote in message
news:uU**************@TK2MSFTNGP05.phx.gbl...
And the javascript will be

location.reload(true);

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

<ma**********@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
>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

UJ wrote:
>>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.


Jul 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.