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

[Solved] RadComboBox client side call get_text() returning encoded characters

1 Answer 186 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Abhay Jain
Top achievements
Rank 1
Abhay Jain asked on 27 Jul 2009, 09:29 AM
I am using a RadComboBox to display the list that is fetched using web service based on whatever text has been entered.

I want to put a validation on the text that it should allow only letters, numbers, spaces, hyphen or apostrophe.

The regular expression I am using is

var regex = new RegExp("[^a-zA-Z0-9\s`,-]+");

But the problem is that when I enter apostrophe and read the text of the combo box using get_text(), I get %60 instead of ` (hexadecimal representation of apostrophe).

Why is this happening? Is there any other function that I can use to get the exact text (in ASCII characters) that has been entered.

1 Answer, 1 is accepted

Sort by
0
Abhay Jain
Top achievements
Rank 1
answered on 27 Jul 2009, 11:03 AM
Kindly ignore this post.

I have got the answer why this was happening.

I was trying to get the text from the client side event handler (OnClientItemsRequesting event) using eventArgs instead of sender object.

Thanks.
Tags
ComboBox
Asked by
Abhay Jain
Top achievements
Rank 1
Answers by
Abhay Jain
Top achievements
Rank 1
Share this question
or