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

XmlDataSource not working in MOSS site

5 Answers 119 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
jaswinder
Top achievements
Rank 1
jaswinder asked on 07 Aug 2008, 01:43 PM
Hi ,

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

Sort by
0
jaswinder
Top achievements
Rank 1
answered on 07 Aug 2008, 01:46 PM
Just to add to this it is an asp control.
 
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
0
Bob
Top achievements
Rank 1
answered on 07 Aug 2008, 09:21 PM
Why do you need to use the xmldatasource control?  I am populating the a tree with xml using 

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

0
jaswinder
Top achievements
Rank 1
answered on 09 Aug 2008, 11:20 AM
Hi,

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
0
jaswinder
Top achievements
Rank 1
answered on 09 Aug 2008, 01:04 PM

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>

0
Bob
Top achievements
Rank 1
answered on 11 Aug 2008, 01:39 PM
From this page:
http://www.telerik.com/help/aspnet-ajax/panel_itemsoverview.html

seems like you should be using NavigateUrl , not URL
Tags
Sharepoint Integration
Asked by
jaswinder
Top achievements
Rank 1
Answers by
jaswinder
Top achievements
Rank 1
Bob
Top achievements
Rank 1
Share this question
or