Hi Carsten,
Thanks for contacting Syncfusion Support.
To utilize the EJ control events, please specify the event handler name (function name) and define this function at client side script section of the sample as mentioned below.
[aspx.cs – code-behind]
Syncfusion.JavaScript.Web.Button b = new Syncfusion.JavaScript.Web.Button();
b.Text = "Eigene Datei hochladen";
b.ID = dialog.ID + "bup";
b.ClientSideOnClick = "clientSideClick"; //event handler 'clientSideClick'
b.ClientIDMode = ClientIDMode.Static;
b.Type = Syncfusion.JavaScript.ButtonType.Button;
dialog.DialogContent.Controls.Add(b);
[.aspx]
<ej:Dialog ID="dialog" runat="server"></ej:Dialog>
[script]
function clientSideClick(e) {
alert("hi");
} |
P:S: EJ Event handler can have function name only and it doesn’t process the string values (like “alert('Hi');”)
Regards,
Francis Paul A.