Alerting the error messages.

2 posts, 0 answers
  1. Ivy
    Ivy avatar
    30 posts
    Member since:
    Feb 2013

    Posted 23 Jul 2013 Link to this post


    There are few input fields and required field validators and I tried to display the error message inside the control which is not completely possible due to browser related issues. So I thought of alerting the error messages on validation failed. But how can I get the error messages in javascript so that I can display them in an alert box? Is this a possible requirement?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Nov 2013 Link to this post

    Hi Ivy,

    Please have a look into the code snippet to alert an error message of RequiredFieldValidator on validation failed.

    <telerik:RadTextBox ID="TxtEmail" runat="server">
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtEmail"
        ValidationGroup="ValidationGroup1" ErrorMessage="TxtEmail Required">
    <br />
    <telerik:RadTextBox ID="TxtPassword" runat="server">
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtPassword"
        ValidationGroup="ValidationGroup1" ErrorMessage="TxtPassword Required">
    <br />
    <telerik:RadButton ID="RadButton1" runat="server" Text="Submit" ValidationGroup="ValidationGroup1"
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="true"
        ValidationGroup="ValidationGroup1" />

    <style type="text/css">
            display : none !important;
            display : none !important;
            display : none !important;


  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top