C# 单击时重新加载同一页面
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15763964/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Reload the same page when click
提问by Binoop
I want to Reload the same page when I click on reload button.any one give the C# code for achieve this?
当我点击重新加载按钮时,我想重新加载同一页面。有人提供 C# 代码来实现这一点吗?
回答by phadaphunk
You can use
您可以使用
Response.Redirect(Request.RawUrl);
Which I found by googling your title.
我通过谷歌搜索你的标题找到的。
You can look there for more informations :
您可以在那里查看更多信息:
回答by ????
You can use like this
你可以这样使用
Page.Redirect(Page.Request.RawUrl,false);
Or suppose you are on default.aspx
and you want get back on the same page use
或者假设您正在使用default.aspx
并且您想回到同一页面使用
Page.Redirect("default.aspx",false);