IIS7 Rewrite changing default button

Posted by Skoder on Stack Overflow See other posts from Stack Overflow or by Skoder
Published on 2010-04-23T17:08:24Z Indexed on 2010/04/23 17:13 UTC
Read the original article Hit count: 326

Hey, I've run into a strange problem regarding default buttons in master pages and IIS7 rewrite module. All my content pages have default buttons set in the code-behind (on prerender), or they are in panels on the aspx page. This works fine on my local machine and on the production server. However, when I enable IIS7 URL Rewrite, the default button is always to the one in the master page.

    protected void LoginButton_PreRender(object sender, EventArgs e)
    {
        Button btnDefault = sender as Button;
        this.Page.Form.DefaultButton = btnDefault.UniqueID;

    }

That's how I set my default button in the code-behind. I'm not sure what the rewrite module could be doing. Thanks for any help

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about iis7