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

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

    There are various method to refresh the page in asp.net like...

    Java Script

     function reloadPage()
     {
         window.location.reload()
     }
    

    Code Behind

    Response.Redirect(Request.RawUrl)
    

    Meta Tag

    
    

    Page Redirection

    Response.Redirect("~/default.aspx"); // Or whatever your page url
    

提交回复
热议问题