当前位置:网站首页>How to set the startup page in asp.net c#

How to set the startup page in asp.net c#

2020-12-07 13:01:36 You can run with long legs

  stay Global.asax Add the following code to

void Application_BeginRequest(object sender, EventArgs e)
{
    if (Request.AppRelativeCurrentExecutionFilePath == "~/")
        Response.Redirect("~/index.aspx");
}

perhaps

stay web.config Add

 <system.webServer>
     <defaultDocument>
            <files>
                <clear />               
                <add value="Login.aspx"/>
            </files>
        </defaultDocument>
</system.webServer>

 

版权声明
本文为[You can run with long legs]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/20201207125003112h.html