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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ej:Button onclick not working with C# code behind file

Thread ID:





128343 Jan 16,2017 12:30 PM UTC Jan 19,2017 03:53 AM UTC ASP.NET Web Forms 3
Tags: Button
Fabian Lorenz
Asked On January 16, 2017 12:30 PM UTC

I'm working with Visual Studio 2015 with a Web Forms Project without a Masterfile page.
I want to have as much code as possible in a C# Code Behind file.
I tried to integrate an ej:Button in my Project, but it won't call the onclick method.
Then i tried the same with an asp:Button and it simply works.
Here is some of my code:
//aspx file:
<ej:Button runat="server" OnClick="onSaveClick"></ej:Button>

//aspx.cs file (the code behind file):
    protected void onSaveClick(object sender, EventArgs e)

Generally speaking, i have a hard time following the documentation,the samples and the API.
I searched for ej:Button and other things in all of them and most examples are without a proper C#
way of doing it. Often there is only a javascript way of doing so.

Am I missing some documentation or is this simply the wrong way im trying to program?

Thanks in advance,
Fabian Lorenz

Thirukumaran Murugan [Syncfusion]
Replied On January 17, 2017 04:35 PM UTC

Hi Fabian Lorenz, 
Thanks for contacting syncfusion support,  
We suspect that server side events might not be triggered due to (ej.webforms.min.js) script file reference missing in the application, so please include the ej.webforms.min.js script file in the page   
For more information visit the below link.  
Thirukumaran M.  

Fabian Lorenz
Replied On January 17, 2017 08:52 PM UTC

Thanks for the reply but in the meantime I solved the problem by myself.
I am using the Syncfusion Project Template to generate a project, so
the required files where already there.
My fault was that i forgot to include:

<asp:ScriptManager runat="server"></asp:ScriptManager>

I wouldn't had the problem if I would have used a masterfile in my project.
The template includes the Scriptmanager there by default.
So I guess in the future I will use the Masterfile more often. :)

Francis Paul Antony Raj [Syncfusion]
Replied On January 19, 2017 03:53 AM UTC

Hi Fabian, 
We are glad to know that your issue has been resolved. 
Please let us know if you need further assistance. 
Francis Paul A. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon