简体   繁体   中英

Redirect default.aspx

I have an ASP.NET project. Currently, it starts on the Default.aspx page. 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.

I've tried putting a Response.Redirect in the Page_Load of Default.aspx, but that doesn't seem to work either.

您是否查看过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). Now right click on MystartPage.aspx --->Set as start page .

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