lgriess 0 Light Poster

This works fine in Firefox but not in IE7????
I have this button:

    <asp:TableRow>
        <asp:TableCell VerticalAlign="Top" HorizontalAlign="Center" ColumnSpan="2">
            <asp:Button runat="server" ID="btn_Forgot" CausesValidation="false" BackColor="#E6E6E6" ToolTip="Click here if you forgot your password" BorderStyle="None" onclick="ForgotButton_Click"  ForeColor="Red" style="font-size: small; font-family: Arial"  Text="forgot your password?" />
        </asp:TableCell>

    </asp:TableRow>

and now the code behind for the button click:

protected void ForgotButton_Click(object sender, EventArgs e) {
            Table1.Visible = false;
            Table2.Visible = true;
}

I've just recently changed the page from using <table> elements to <asp:Table type
elements, I don't know if this is the cause of the problem or not.

Anybody please advise me.

Dani AI

Generated

— a server-side Click handler that fires in Firefox but not in IE7 most often points to a client-side issue or to the control not being rendered where ASP.NET expects. The recent swap from plain HTML tables to server-side asp:Table controls is a good lead: that change can move elements outside the single form runat="server" or alter rendered IDs and names.

Diagnostic checklist (common, high-yield items):

  • Verify the rendered button element appears inside the page form (only one form runat="server"). If it is outside the form, IE and Firefox can behave differently.
  • Open the page source in both browsers and compare the generated HTML (input/button type, name/id and its position).
  • Check for client-side script errors in IE (script debugging / developer tools). A JavaScript error can halt ASP.NET postback scripts.
  • Look for form-field names or ids that shadow DOM methods in IE (for example an element named submit can override form.submit).
  • Try toggling the button behavior to force ASP.NET's postback script by setting UseSubmitBehavior="false" on the Button; that distinguishes native-submit problems from __doPostBack issues.
  • Confirm no overlapping elements or CSS/z-index issues prevent the click from reaching the control, and ensure no duplicate IDs or extra nested server forms exist.

A minimal repro page with only the button and handler will quickly show whether the problem is page-level (scripts/CSS/layout) or control-level (rendering/ID wiring).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.