XmlDataSource not working in MOSS site

6 posts, 0 answers
  1. jaswinder
    jaswinder avatar
    6 posts
    Member since:
    Aug 2008

    Posted 07 Aug 2008 Link to this post

    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
      
  2. jaswinder
    jaswinder avatar
    6 posts
    Member since:
    Aug 2008

    Posted 07 Aug 2008 Link to this post

    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

  3. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 07 Aug 2008 Link to this post

    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

  4. jaswinder
    jaswinder avatar
    6 posts
    Member since:
    Aug 2008

    Posted 09 Aug 2008 Link to this post

    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
  5. jaswinder
    jaswinder avatar
    6 posts
    Member since:
    Aug 2008

    Posted 09 Aug 2008 Link to this post


    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>

  6. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 11 Aug 2008 Link to this post

    From this page:
    http://www.telerik.com/help/aspnet-ajax/panel_itemsoverview.html

    seems like you should be using NavigateUrl , not URL
Back to Top