This is a migrated thread and some comments may be shown as answers.

RadTextBox TextChanged event throws "Unterminated string constant"

2 Answers 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
AName
Top achievements
Rank 1
AName asked on 09 Jan 2014, 10:50 PM

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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Jan 2014, 09:31 AM
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.
0
Hristo Valyavicharski
Telerik team
answered on 14 Jan 2014, 12:55 PM
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.
Tags
General Discussions
Asked by
AName
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Hristo Valyavicharski
Telerik team
Share this question
or