'OK' or 'SAVE' button inside the ModalPopUpExtender not working!

Posted by Coolbharat under ASP.NET on 1/22/2014 | Points: 10 | Views : 2945 | Status : [Member] | Replies : 0
In the ModalPopUpExtender when the SAVE button is clicked inside the panel or the modal popup there is no response i.e. the screen closes
although i have provided a Click method in the code behind.If i set the OkControlID="" i.e. omit the ID of the SAVE button it does nothing
when i click the SAVE button.Please Help me out on this topic.

<asp:Button ID="btn_edit" runat="server" Text="EDIT" Height="43px" Width="87px"
CssClass="button_example" onclick="btn_edit_Click1"></asp:Button>

<asp:Panel ID="Panel_edit" runat="server" BorderColor="Black" BackColor="White" Height="400px"
Width="800px" HorizontalAlign="Center">
<asp:GridView ID="GridView1" runat="server"></asp:GridView>
<asp:Button ID="btn_save" runat="server" Text="SAVE" OnClick="btn_save_Click" />
<asp:Button ID="btn_cancel" runat="server" Text="cancel" OnClick="btn_cancel_Click" />

<ajax:ModalPopupExtender ID="modalpopup_extender_edit" runat="server" TargetControlID="btn_edit" PopupControlID="Panel_edit"
DropShadow="true" BackgroundCssClass="modalBackground" OkControlID="" CancelControlID="btn_cancel">
<ajax:RoundedCornersExtender ID="RoundedCornersExtender_edit_panel" runat="server" TargetControlID="Panel_edit" BorderColor="#9A35FF" Corners="All" Radius="8"></ajax:RoundedCornersExtender>

Code Behind-:
protected void btn_save_Click(object sender, EventArgs e)
{ //Begining of ModalPopUpExtender 'SAVE' Button Click.

Response.Write("<Script language='javascript' type='text/javascript'>alert('Hi!')</Script>");

} //End of ModalPopUpExtender 'SAVE' Button Click.

protected void btn_cancel_Click(object sender, EventArgs e)
{ //Begining of ModalPopUpExtender 'CANCEL' Button Click.

} //End of ModalPopUpExtender 'CANCEL' Button Click.

protected void btn_edit_Click1(object sender, EventArgs e)


(No response found.)

Login to post response