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

后端 未结 14 1952
悲&欢浪女
悲&欢浪女 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:24

    The only correct way that I could do page refresh was through JavaScript, many of top .NET answers failed for me.

    Response.Write("");
    

    Put the above code in button click event or anywhere you want to force page refresh.

提交回复
热议问题