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

后端 未结 14 1949
悲&欢浪女
悲&欢浪女 2020-11-28 02:12

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

I\'d rather not use Response.Redirect() because I don\'t know if the page I will be on, as it\'s i

14条回答
  •  没有蜡笔的小新
    2020-11-28 02:41

    In your page_load, add this:

    Response.CacheControl = "no-cache";
    Response.AddHeader("Pragma", "no-cache");
    Response.Expires = -1;
    

提交回复
热议问题