Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh Page C# ASP.NET

Is there a Page.Refresh type of command to refresh a page?

I don't want to redirect to the page or refresh in JavaScript.

like image 645
Eric Avatar asked Feb 10 '10 20:02

Eric


People also ask

How to refresh the page c#?

You can try with Response. Redirect() method at the server side or use Form.

How to refresh the page in asp net?

Response. Write("<script type='text/javascript'> setTimeout('location. reload(true); ', timeout);</script>"); Put the above code in button click event or anywhere you want to force page refresh.

Is page refresh a postback?

A refresh mean a complete reload of the page, without any form data. This is essentially an HTTP GET . A post back is when the page is posted to itself (through the form action="" ). This is essentially an HTTP POST .


1 Answers

I think this should do the trick (untested):

Page.Response.Redirect(Page.Request.Url.ToString(), true); 
like image 115
Fermin Avatar answered Oct 08 '22 00:10

Fermin