How to Create modal Pop-Up form in asp.net using vb.net

Please help me

Last updated:7/8/2018 11:34:56 PM

1 Answers

Prakash nidhi Verma
Prakash nidhi Verma

How to Create modal Pop-Up form in asp.net using vb.net :

The ModalPopup create a modal popup using client-side means it's control in the AJAX Control Toolkit offers triggered on the server-side. use this below code for create model pop-up : 

<asp:Button ID='ClientButton' runat='server' Text='Launch 
 Modal Popup (Client)' />
<ajaxToolkit:ModalPopupExtender ID='mpe' runat='server'
 TargetControlId='ClientButton' PopupControlID='ModalPanel'
 OkControlID='OKButton'/>
<asp:ScriptManager ID='asm' runat='server' />
<asp:Button ID='ServerButton' runat='server' Text='Launch Modal Popup (Server)'  
 OnClick='ServerButton_Click' />
<script type='text/javascript'> 
 var launch = false;
 function launchModal()
 {
 launch = true;
 }

example: 

<form id='form1' runat='server'> 
    <div>
        <asp:ToolkitScriptManager ID='ToolkitScriptManager1' runat='server'>
        </asp:ToolkitScriptManager>
        <asp:Button ID='Button1' runat='server' Text='fill form' />
        <asp:ModalPopupExtender ID='ModalPopupExtender1' runat='server' CancelControlID='Button2' TargetControlID='Button1' PopupControlID='Panel1'>
        </asp:ModalPopupExtender>
        <asp:Panel ID='Panel1' runat='server' CssClass='Popup' align='center' style = 'display:none'>
       
        <br/>
        <asp:Button ID='Button2' runat='server' Text='Close' />
        </asp:Panel>
    </div>
    </form>

Answer