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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-10 17:52:35  来源:igfitidea点击:

Reload the same page when click

c#asp.net

提问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 ????

You can use like this

你可以这样使用

Page.Redirect(Page.Request.RawUrl,false);

Or suppose you are on default.aspxand you want get back on the same page use

或者假设您正在使用default.aspx并且您想回到同一页面使用

Page.Redirect("default.aspx",false);