Set the ModalPopupExtender control's TargetControlID property to the ID of the Panel control.
Set the ModalPopupExtender control's PopupControlID property to the ID of the Panel control.
Add an event handler for the ModalPopupExtender control's PopupOpened event.
In the event handler, do whatever you want to do when the modal pop-up form is opened.
Here is an example of the code you would need to create modal pop-up form in ASP.NET using VB.NET:
VB.Net
<%@ Page Language="VB" AutoEventWireup="true" CodeBehind="ModalPopup.aspx.vb" Inherits="ModalPopup.ModalPopup" %>
<html>
<head>
<title>Modal Popup</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Open Modal Popup" />
<asp:Panel ID="ModalPanel" runat="server" Width="500px">
<asp:Button ID="OKButton" runat="server" Text="Close" />
</asp:Panel>
<asp:ModalPopupExtender ID="mpe" runat="server" TargetControlID="Button1" PopupControlID="ModalPanel" />
</form>
</body>
</html>
Public Class ModalPopup
Protected Overrides Sub PopupOpened(ByVal sender As Object, ByVal e As EventArgs)
' Do whatever you want to do when the modal pop-up form is opened.
End Sub
End Class
This code will create a modal pop-up form and bind it to the page. When the user clicks the "Open Modal Popup" button, the modal pop-up form will be opened. The PopupOpened event handler will be raised when the modal pop-up form is opened.
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 :
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Sure, I can help you with that. Here are the steps on how to create modal pop-up form in ASP.NET using VB.NET:
VB.Net
Here is an example of the code you would need to create modal pop-up form in ASP.NET using VB.NET:
VB.Net
This code will create a modal pop-up form and bind it to the page. When the user clicks the "Open Modal Popup" button, the modal pop-up form will be opened. The PopupOpened event handler will be raised when the modal pop-up form is opened.
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 :
example: