navigation url from webconfig

2 posts, 0 answers
  1. Eva
    Eva avatar
    50 posts
    Member since:
    Jun 2010

    Posted 18 Nov 2011 Link to this post

    I have a radtabstrip




    telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Windows7"




    Align="Justify" ReorderTabsOnSelect="True" Width="347px" >








    <telerik:RadTab Text="Providers" NavigateUrl="http://localhost/CMIPSII/Default.aspx" runat="server">








    <telerik:RadTab Text="Reports" NavigateUrl="http://localhost/CMIPSII/Report/Reports.aspx"

















    I have to store the navigation url in webconfig and refer here.

    Need help.


  2. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 19 Nov 2011 Link to this post


    The configurationManager class is your friend.

    Remove the NavigateUrl properties from your mark-up and add this to your page's OnLoad  event handler...

    RadTabStrip1.Tabs[0].NavigateUrl = ConfigurationManager.AppSettings["Providers"];
    RadTabStrip1.Tabs[1].NavigateUrl = ConfigurationManager.AppSettings["Reports"];

    Just add 2 new keys "Providers" and "Reports" to the <appSettings> section of your web.config file with the relevant uel as the Value attributes.

    Obviously, you should do some range checking, but this is all you need.

Back to Top