简体   繁体   中英

How do I open a new page from code behind?

This question is probably already answered here, but I couldn't find the answer? Is there any way to navigate to another page in code-behind?

Response.Redirect("path_to/newpage.aspx");

除了Response.Redirect,您还可以使用Server.Transfer(“〜/ path_to / newpage.aspx”),当您希望向用户显示其他页面而不更改浏览器中的URL时,该功能很有用。

by using

1) Response.Redirect ("path");

2) Server.Transfer ("path");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM