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

navigation url from webconfig

1 Answer 72 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Eva
Top achievements
Rank 1
Eva asked on 19 Nov 2011, 12:34 AM
I have a radtabstrip

<

 

 

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

 

 

 

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

 

 

 

<Tabs>

 

 

 

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

 

 

 

</telerik:RadTab>

 

 

 

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

 

 

 

runat="server">

 

 

 

</telerik:RadTab>

 

 

 

</Tabs>

 

 

 

</telerik:RadTabStrip>

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

Need help.

 

1 Answer, 1 is accepted

Sort by
0
Stuart Hemming
Top achievements
Rank 2
answered on 19 Nov 2011, 05:35 PM
Eva,

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.

-- 
Stuart
Tags
TabStrip
Asked by
Eva
Top achievements
Rank 1
Answers by
Stuart Hemming
Top achievements
Rank 2
Share this question
or