RadTextBox TextChanged event throws "Unterminated string constant"

3 posts, 0 answers
  1. AName
    AName avatar
    14 posts
    Member since:
    Jul 2013

    Posted 09 Jan 2014 Link to this post

    I have a radtextbox that I want to utilize the OnTextchange event.

    No matter what I input into the text box I immediately get "JavaScript runtime error: Unterminated string constant".



    Has anyone else seen this? Nothing too complex here.



    Inside my aspx

    <telerik:RadTextBox ID="formLocZip" runat="server" EmptyMessage="Zip" MaxLength="7" OnTextChanged="formLocZip_TextChanged" AutoPostBack="true">

    </telerik:RadTextBox>




    Inside my code behind :



    Protected Sub formAddLocZip_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles formAddLocZip.TextChanged


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

    Posted 10 Jan 2014 Link to this post

    Hi,

    Unfortunately I couldn't replicate the issue at my end. Please have a look into the sample code snippet which works fine at my end. Please provide your full code for further help.

    ASPX:
    <telerik:RadTextBox ID="RadTextBox1" runat="server" AutoPostBack="true" EmptyMessage="Zip"
        MaxLength="7" OnTextChanged="RadTextBox1_TextChanged">
    </telerik:RadTextBox>

    C#:
    protected void RadTextBox1_TextChanged(object sender, EventArgs e)
    {
        string text = RadTextBox1.Text;
    }

    Thanks,
    Shinu.
  3. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 14 Jan 2014 Link to this post

    Hi,

    look at this post http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/unterminated-string-constant-error-when-calling-rad-alert.aspx it seems to address the same problem.

    Regards,
    Hristo Valyavicharski
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top