Hi!
I want to create a Dialog control from server-side that is created automatically when a button is clicked.
I referred to "https://www.syncfusion.com/forums/120903/create-dialog-in-server-side" and converted the sample program(in VB) to a program in C#, but it didn't work.
Below is my source code.
Please tell me what is wrong.
Thank you!
kyousuke
aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="satei_platform.test" %>
<%@ Register Assembly="Syncfusion.EJ.Web, Version=14.1451.0.41, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form runat="server">
<div id="divtest" runat="server"></div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
</form>
</body>
</html>
cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace satei_platform
{
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Syncfusion.JavaScript.Web.Dialog test = new Syncfusion.JavaScript.Web.Dialog();
test.ShowOnInit = true;
test.IsResponsive = true;
test.Title = "Preua";
divtest.Controls.Add(test);
}
}
}