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

Button OnClick event is not work and how to set validation for maskedit control on button click

I am new to syncfusion. I have issue with the control. Please help me. I have simple contact form which is having name, email and message text box. I want to set required validation as well as for email validation. If validation does not fulfilled than button click with not work.
I also set button OnClick event. I also written code on button click in code behind. But OnClick is not work. So please help me out with these issue. Please check my code which is written below:


  • Code behind code
    protected void btnSendEmail_Click(object Sender, Syncfusion.JavaScript.Web.ButtonEventArgs e)
    if (txtEmail.Value.Trim() != string.Empty && txtName.Value.Trim() != string.Empty && txtMessage.Value.Trim() != string.Empty)
    string Message = SendEmail();

    5 Replies

    AP Arun Palaniyandi Syncfusion Team November 19, 2015 09:22 AM UTC

    Hi Badal

    Thanks for the update,

    We were unable to reproduce the issue, “Button OnClick event is not work” by the given code. From our end, the given code is working perfectly and the OnClick event is also working for the sample. We have also provided the video demo for the corresponding sample.

    Please find the video in the below link.


    We have also attached the sample by setting the required field validation.


    Please share the screenshots of the corresponding error , so that we will help you. 


    Arun P

    BP Badal Patel November 19, 2015 12:26 PM UTC

    Hi Arun,

    Thank you for quick response.

    I download your source code. I open it and run it. but click event is not working in it.

    AP Arun Palaniyandi Syncfusion Team November 20, 2015 12:16 PM UTC

    Hi Badal,

    Thanks for the  update,

    Please log on to our support website to check for further updates on the reported issue.


    Please let me know if you have any questions.

    Arun P

    WI Wiseman December 8, 2016 09:24 AM UTC

    Did you find any solution for the above problem I am also having the same problem, I did try those sample it also not working.

    FP Francis Paul Antony Raj Syncfusion Team December 9, 2016 11:34 AM UTC

    Hi Wiseman, 
    Usually, the server-side event might not be triggered due to one of the following reasons. So, please check the below references in your page. 

    1. Please check
    asp:ScriptManager is referred in your ‘Site.Master’ page.
    2. Please check
    ej.webform.min.js file is referred at the end of the script section as given below. 
    <head runat="server"> 
    <%: Scripts.Render("~/Scripts/jquery-1.10.2.min.js")%>  
    <%: Scripts.Render("~/Scripts/jsrender.min.js")%>  
    <%: Scripts.Render("~/Scripts/ej/ej.web.all.min.js")%>  
    <%: Scripts.Render("~/Scripts/ej/ej.webform.min.js")%> 
        <form runat="server"> 
            <asp:ScriptManager runat="server"> 
            <!--Other Codes--> 
    We have explained the necessity to refer the above mentioned references in our help document under Adding required Script files section.

    Francis Paul A. 

    Live Chat Icon For mobile
    Up arrow icon