Event Handlers Might Not Be Not Raised in a Default Document in IIS 7 or IIS 7.5 Integrated Mode?

后端 未结 1 1308
予麋鹿
予麋鹿 2020-12-18 23:34

After pulling my hair out for the last three days in my first non-upgraded ASP.NET 4.0 Web Application, I stumble across this post explaining it all.

http://jai-on-a

相关标签:
1条回答
  • 2020-12-19 00:08

    Whether the form is specified on the default page, or in the master page, it is still accessible via the Form property on the page.

    Therefore, you should be able to set it's action in the code behind for that page.

    protected void Page_Load(object sender, System.EventArgs e)
    {
        this.Form.Action = "Default.aspx";
    }
    
    0 讨论(0)
提交回复
热议问题