How do I refresh the page in ASP.NET? (Let it reload itself by code)

In my user controls, after updating data I do:

  Response.Redirect(Request.RawUrl);    

That ensures that the page is reloaded, and it works fine from a user control. You use RawURL and not Request.Url.AbsoluteUri to preserve any GET parameters that may be included in the request.

You probably don’t want to use: __doPostBack, since many aspx pages behave differently when doing a postback.

Leave a Comment