Hide Ajax PopupControlExtender on Button click using javascript in Asp.net


Write the javascript function with the name HidePopup():
<script language="javascript" type="text/javascript">

function HidePopup() {
        
         $find('<%=PopupPstureGrip.ClientID%>').hidePopup();
         return false;
     }


</script>

Add Ajax PopupControlExtender control with some properties

<asp:PopupControlExtender ID="PopupPstureGrip"  runat="server" CommitProperty="value"   TargetControlID="txtposture" PopupControlID="PanelPostureGrip" Position="top" ></asp:PopupControlExtender>

Add asp.net Hide Button and call the javascript HidePopup() function in OnClientClick event

<asp:Button ID="btnCancel1" runat="server" Text="Cancel"   OnClientClick="HidePopup();"/>



1 comment:

  1. Thanks
    It works nice
    but I want to commit value also using java script

    ReplyDelete