[英]Redirect default.aspx
I have an ASP.NET project. 我有一个ASP.NET项目。 Currently, it starts on the Default.aspx page.
当前,它从Default.aspx页开始。 However, I'd like to change this so that it starts on a different page.
但是,我想更改此设置,以使其在其他页面上开始。 In VS2008 it is possible to specify the start page, but that doesn't seem to affect the published product.
在VS2008中,可以指定起始页,但这似乎不会影响已发布的产品。
I've tried putting a Response.Redirect
in the Page_Load of Default.aspx, but that doesn't seem to work either. 我尝试将
Response.Redirect
放在Default.aspx的Page_Load中,但这似乎也不起作用。
您是否查看过IIS设置-通常对于该网站,您可以指定“默认内容页面”,并且如果该页面存在于网站的根文件夹中,则默认值为转到指定的aspx页面(通常将其设置为Default.aspx的)
Open your solution file in VS.net2008 .Go to Solution explorer .Here locate your .aspx page you want to make as the startup page (eg:MystartPage.aspx). 在VS.net2008中打开解决方案文件。转到解决方案资源管理器。在这里找到要创建的.aspx页面作为启动页面(例如:MystartPage.aspx)。 Now right click on MystartPage.aspx --->Set as start page .
现在,右键单击MystartPage.aspx --->设置为起始页。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.