I have the following issue,
I have a Treeview populating perfectly with server side code, and changing the node text using the editor.content client side.
I set up a web service to handle load on demand and I end up with the following error:
A potentially dangerous Request.Form value was detected from the client (RadTreeView1_ClientState="...:{"text":"<span style=\"color:...").
I load the root nodes from server side, however I add nodes clientside and change the node text client side:
string connectstr = SqlConnect;
SqlConnection Sqlconnect = new SqlConnection(connectstr);
string sql = "Select TemplateID, TemplateLineID, TemplateNodeOrder, SectionID, ParentTemplateLineID, NodeLevel, NodeText "+
"From TemplateNode " +
"Where ParentTemplateLineID is null "+
"Order By SectionID ";
SqlDataAdapter adapter = new SqlDataAdapter(sql, connectstr);
DataTable dataTable = new DataTable();
adapter.Fill(dataTable);
RadTreeView1.WebServiceSettings.Method =
"LoadNodes";
RadTreeView1.WebServiceSettings.Path =
"TemplateLoadOnDemand.asmx";
foreach (DataRow row in dataTable.Rows)
{
RadTreeNode node = new RadTreeNode();
node.Text = row[
"NodeText"].ToString();
node.Value = row[
"TemplateLineID"].ToString();
node.ExpandMode =
TreeNodeExpandMode.WebService;
RadTreeView1.Nodes.Add(node);
}
My settings for the treeview are :
<
telerik:RadTreeView ID="RadTreeView1" Runat="server" EnableDragAndDrop="true"
onnodedrop="RadTreeView1_NodeDrop" EnableDragAndDropBetweenNodes="True"
onclientnodedropping="nodeDropping" OnClientContextMenuItemClicking="OnClientContextMenuItemClicking"
MultipleSelect="True" OnClientNodeEdited="OnClientNodeEditedHandler"
Skin="Outlook" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick"
CheckChildNodes="True" onnodeedit="RadTreeView1_NodeEdit"
style="white-space: normal;" PersistLoadOnDemandNodes="true" OnNodeDataBound="RadTreeView1_NodeDataBound"
OnClientNodeClicked="OnClientNodeClicked" >
I did the following to resolve the error but continue to get it....
In Script Manager I set
EnablePartialRendering="False"
Everything works when I don't use the webservice, client side calls and server side calls are perfect.... Its when I load the webservice that I start throwing errors. The web service loads the child nodes fine... Editing or adding is a big issue when using the web service.
Thank you in advance for your help.
~Julie