We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Create Dialog in Servber-Side by C#

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!



<%@ 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" />
    <form runat="server">
     <div id="divtest" runat="server"></div> 

        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />




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";

1 Reply

SS Selvamani Sankarappan Syncfusion Team September 19, 2016 09:33 AM UTC

Hi Kyousuke,  
Thanks for contacting Syncfusion support,   
We had checked your code example. We suspect that an issue (Dialog is not opened when we click the button) with your code example may cause due to the JQuery which is not referred in your application. It throws the console error. We need ASP ScriptManager to render the dialog control since our scripts from assembly will be registered in it.   
We had prepared a sample based on your code example. Please refer to the following sample:   
If you still face any difficulties, kindly revert with error details and corresponding replication procedure.   
Selvamani S   

Live Chat Icon For mobile
Up arrow icon