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

Something missing!

2 Answers 80 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 21 Oct 2008, 12:58 AM
I'm following the example code which is this on the server side:
protected void Page_Load(object sender, EventArgs e)
{
 
if (!Page.IsPostBack)
 {
   RadTab tab1 =
new RadTab();
   tab1.Text =
"Tab 1";
   RadTab tab11 =
new RadTab();
   tab11.Text =
"Child 1";
   tab1.Tabs.Add(tab11);
   RadTab tab2 =
new RadTab();
   tab2.Text =
"Tab 2";
   RadTab tab3 =
new RadTab();
   tab3.Text =
"Telerik";
   tab3.NavigateUrl =
"http://www.telerik.com";
   RadTabStrip1.Tabs.Add(tab1);
   RadTabStrip1.Tabs.Add(tab2);
   RadTabStrip1.Tabs.Add(tab3);
 }
}
The RadTabStrip1 was defined. Now I want to add tabs programmatically and when I do the first line of
 RadTab tab1= new RadTab()
it gives me an error message.
'RadTab' is a 'namespace' but is used like a 'type'
What is going on here? Did I miss something during the installation?



2 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 21 Oct 2008, 06:54 AM
Hello Patrick,

Is it possible that you have defined RadTab namespace in your code behind which confuses the compilator when you build and compile your project? By default if you have the using Telerik.Web.UI; clause in the code-behind of the page the RadTab class should be recognized automatically and objects will be cast to that type successfully.

If the issue seems to be elsewhere, I suggest you open a support ticket and attach the problematic page along with its code-behind. I will examine your code definitions and will advice you further.

All the best,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Patrick
Top achievements
Rank 1
answered on 21 Oct 2008, 01:13 PM
I solved the problem. I had to uninstall the product and reinstall it. I started a new project and everything now works as advertised.
Tags
TabStrip
Asked by
Patrick
Top achievements
Rank 1
Answers by
Paul
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or