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

Special characters in Attributes.Add

1 Answer 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Dimitry
Top achievements
Rank 1
Dimitry asked on 09 Aug 2011, 11:23 AM
Hey,

After rendering the code below:
_RadTreeNode.Attributes.Add("onclick", "func1('" + _Value + "')");

Looks like:
.. onclick="func1('SomeValue')" ..

apostrophe symbol encoded to ' and javascript crashes.

Thanks, for help.

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 11 Aug 2011, 05:51 PM
Hi Dimitry,

 RadTreeView doesn't support that kind of attributes (which are to be rendered by the ASP.NET Framework).

Could you, please, specify what exactly are you trying to achieve? In most such scenarios, there is already a way to implement it with the provided API of RadTreeView. And if not, we can always think of a way to attach some handler client-side (again using the API and some jQuery).

Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TreeView
Asked by
Dimitry
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or