Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143483 | Mar 21,2019 08:38 PM UTC | Apr 9,2019 04:50 AM UTC | ASP.NET Web Forms | 3 |
![]() |
Tags: Dialog |
<form id="form1" runat="server"> <asp:ScriptManager runat="server" ID="aspScriptManager1" /> <asp:UpdatePanel ID="up1" runat="server"> <ContentTemplate> <div runat="server" id="div2" class="control"/> <ej:Button ID="Button1" runat="server" Type="Button" Text="Open window 1" Size="Normal" OnClick="openWindow1" ShowRoundedCorner="true" /> <ej:Button ID="Button2" runat="server" Type="Button" Text="Open window 2" Size="Normal" OnClick="openWindow2" ShowRoundedCorner="true" /> ContentTemplate> asp:UpdatePanel> form>
protected void openWindow1(object Sender, Syncfusion.JavaScript.Web.ButtonEventArgs e) { Syncfusion.JavaScript.Web.Dialog test1 = new Syncfusion.JavaScript.Web.Dialog(); test1.ShowOnInit = true; test1.IsResponsive = true; test1.Title = "Window 1 - " + DateTime.Now.ToString("hh:mm:ss"); test1.ID = "win1_" + DateTime.Now.ToString("hhmmss"); test1.ContentUrl = "page1.aspx"; test1.ContentType = "iframe"; div2.Controls.Add(test1); } protected void openWindow2(object Sender, Syncfusion.JavaScript.Web.ButtonEventArgs e) { Syncfusion.JavaScript.Web.Dialog test2 = new Syncfusion.JavaScript.Web.Dialog(); test2.ShowOnInit = true; test2.IsResponsive = true; test2.Title = "Window 2 - " + DateTime.Now.ToString("hh:mm:ss"); test2.ID = "win2_" + DateTime.Now.ToString("hhmmss"); test2.ContentUrl = "page2.aspx"; test2.ContentType = "iframe"; div2.Controls.Add(test2); }
<div runat="server" id="container" class="control">
<div runat="server" id="dialog1"></div>
<div runat="server" id="dialog2"></div>
</div>
|
public partial class DialogFeatures : System.Web.UI.Page
{
Syncfusion.JavaScript.Web.Dialog test1 = new Syncfusion.JavaScript.Web.Dialog();
Syncfusion.JavaScript.Web.Dialog test2 = new Syncfusion.JavaScript.Web.Dialog();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void openWindow1(object Sender, Syncfusion.JavaScript.Web.ButtonEventArgs e)
{
test1.ShowOnInit = true;
test1.IsResponsive = true;
test1.Title = "Window 1 - " + DateTime.Now.ToString("hh:mm:ss");
test1.ID = "win1_" + DateTime.Now.ToString("hhmmss");
test1.ContentUrl = "Page1.aspx";
test1.ContentType = "iframe";
dialog1.Controls.Add(test1);
container.Controls.Add(dialog1);
}
protected void openWindow2(object Sender, Syncfusion.JavaScript.Web.ButtonEventArgs e)
{
test2.ShowOnInit = true;
test2.IsResponsive = true;
test2.Title = "Window 2 - " + DateTime.Now.ToString("hh:mm:ss");
test2.ID = "win2_" + DateTime.Now.ToString("hhmmss");
test2.ContentUrl = "Page2.aspx";
test2.ContentType = "iframe";
test2.ClientSideOnCreate = "Oncreate";
dialog2.Controls.Add(test2);
container.Controls.Add(dialog2);
}
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.