views:

106

answers:

1

When I click the button to open the modal popup it shows the popup but then continues and forces a postback causing the page to reload and the modal popup to be hidden again.

Here is the markup for the control:

 <asp:Button id="LoginOpenButton" runat="server" Text="Login"/>

<asp:Panel ID="ContentPanel" runat="server" CssClass="modalPopup">
    <fieldset>
        <asp:MultiView ID="loginMultiView" runat="server" ActiveViewIndex="0">
            <asp:View ID="loginView" runat="server">
                <table>
                    <tr>
                        <th colspan="2" align="left">Login</th>
                    </tr>
                    <tr>
                        <td>Email:</td>
                        <td>
                            <asp:TextBox ID="emailTextbox" runat="server" MaxLength="128" />
                            <asp:RequiredFieldValidator ID="emailTextbox_RFV" runat="server" Text="*" ControlToValidate="emailTextbox" ValidationGroup="Login" />
                        </td>
                    </tr>
                    <tr>
                        <td>Password:</td>
                        <td>
                            <asp:TextBox ID="passwordTextbox" runat="server" MaxLength="128" />
                            <asp:RequiredFieldValidator ID="passwordTextbox_RFV" runat="server" Text="*" ControlToValidate="passwordTextbox" ValidationGroup="Login" />
                        </td>
                    </tr>
                    <tr>
                        <td><asp:LinkButton ID="forgotPassword" runat="server" Text="Forgot Password?" OnClick="forgotPassword_OcnClick" /></td>
                        <td><asp:Button ID="loginButton" runat="server" Text="Login" OnClick="loginButton_submit" CausesValidation="true" ValidationGroup="Login" /></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><asp:Button ID="cancelButton" runat="server" Text="Cancel" /></td>
                    </tr>
                    <tr>
                        <th colspan="2"><asp:Label ID="ErrorLabel" runat="server" ForeColor="Red" Text="" /></th>
                    </tr> 
                </table>    
            </asp:View>
            <asp:View ID="forgotPasswordView" runat="server">
                <table>
                    <tr>
                        <td>E-Mail Address:</td>
                        <td>
                            <asp:TextBox ID="ForgotPassTextbox" runat="server" />
                            <asp:RequiredFieldValidator ID="ForgotPassTextbox_RFV" runat="server" Text="*" ControlToValidate="ForgotPassTextbox" ValidationGroup="Forgot" />
                        </td>
                    </tr>
                    <tr>
                        <th colspan="2" align="right"><asp:Button ID="forgotPassButton" runat="server" Text="Retrieve Password" OnClick="forgotPassButton_OnClick" CausesValidation="true" ValidationGroup="Forgot" /></th>
                    </tr>
                </table>
            </asp:View>
        </asp:MultiView>    
    </fieldset>
</asp:Panel>

<act:ModalPopupExtender ID="LoginMPE" runat="server" TargetControlID="LoginOpenButton" PopupControlID="ContentPanel" ></act:ModalPopupExtender>

My script manager has no properties other than the id and runat set.

Any ideas?

A: 

Look at this question may be it helps you

http://stackoverflow.com/questions/41824/how-do-i-prevent-the-closing-of-modal-popup-windowmodalpopupextender-on-postbac
Fraz Sundal