I'm using xmldatasource along with Radmenu control to create a navigation structure.
I've added an explicit entry for the xmlDataSource control in the web config file as follows:
<SafeControl Assembly="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="XmlDataSource" Safe="true" AllowRemoteDesigner="true" />
But when rendered it throws error saying that XmlDatasource isallowed on the page. The type is not registered as safe.
Please provide solution to this or any pointer.
Thanks in advance!!!
jaswinder
5 Answers, 1 is accepted
I tried adding other controls like textbox, sqldatasource without any modification to webconfig, it worked for all.
It doesnt work specifically fot asp:XmlDataSource.
~Jaswinder
m_RadTreeFolderHierarchy.LoadContentFile(
"~/MJComponentSupport/TreeData.xml")
where /MJComponentSupport is a virtual directory under my site.
Here is the thread that I created and the answer provided.
http://www.telerik.com/community/forums/thread/b311D-bkcakm.aspx
I can load the file the way you have suggested, but i think it accepts the xml file in certain format for Radmenu, Radtabstrip, Radpanel and other navigation controls.
Could you share the format for each of these controls.
Thanks
~jaswinder
Hi,
Found the various formats for navigaion controls.
http://www.telerik.com/demos/aspnet/Prometheus/Panelbar/Examples/PopulatingWithData/XmlDefinition/DefaultCS.aspx
My code is:
RadMenu1.LoadContentFile(
"~/App_Data/menu.xml");
RadTabStrip1.LoadContentFile("~/App_Data/Tab.xml");
RadPanelBar1.LoadContentFile(
"~/App_Data/panel.xml");
AND
<
telerik:RadMenu ID="RadMenu1" runat="server" DataNavigateUrlField="Url" Skin="Inox" DataValueField="Text"></telerik:RadMenu>
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Office2007" DataNavigateUrlField="Url" DataTextField="Text" DataValueField="Text"></telerik:RadTabStrip>
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Office2007" DataNavigateUrlField="Url" DataTextField="Text" DataValueField="Text"></telerik:RadPanelBar>
But I'm facing one problem, Any of the navigation conrol does not pick the "Url" field for DataNavigationUrl attribute, and hence the page posts back to itself by appending "#".
If I use the general xml format which is mentioned below i get the error, for any control:
<Items xmlns=''> was not expected.
<?
xml version="1.0" encoding="utf-8" ?>
<
Items Text="">
<
Item Text="European cities" Url="http://en.wikipedia.org/wiki/Sofia" >
<
Item Text="Sofia" Url="http://en.wikipedia.org/wiki/Sofia" />
<
Item Text="Berlin" Url="http://en.wikipedia.org/wiki/Berlin" />
<
Item Text="Paris" Url="http://en.wikipedia.org/wiki/Paris" />
</
Item>
<
Item Text="North American cities" Url="http://en.wikipedia.org/wiki/Sofia">
<
Item Text="Boston" Url="http://en.wikipedia.org/wiki/Boston" />
<
Item Text="San Francisco" Url="http://en.wikipedia.org/wiki/San_Francisco" />
<
Item Text="Seattle" Url="http://en.wikipedia.org/wiki/Seattle" />
<
Item Text="Toronto" Url="http://en.wikipedia.org/wiki/Toronto" />
</
Item>
</
Items>
http://www.telerik.com/help/aspnet-ajax/panel_itemsoverview.html
seems like you should be using NavigateUrl , not URL