Reset RadTextBox value to default on client

2 posts, 0 answers
  1. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 11 Oct 2013 Link to this post

    How can I reset a RadTextBox to its configured EmptyMessage value using JavaScript?

    Note, I want to use the property value without having to state it twice.

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

    Posted 11 Oct 2013 Link to this post

    Hi Craig,

    Please check the following code I tried to clear the RadTextBox content and display the empty message.

    <telerik:RadTextBox ID="RadTextBox1" runat="server" EmptyMessage="Enter Name">
    <telerik:RadButton ID="RadButton1" runat="server" Text="Clear Textbox" AutoPostBack="false"

    <script type="text/javascript">
        function clearTextbox(sender, args) {
            var radtextbox = $find('<%=RadTextBox1.ClientID %>');

Back to Top