Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Using tabstrip in a user control

Reply
Thread Tools

Using tabstrip in a user control

 
 
Adwait Ullal
Guest
Posts: n/a
 
      11-22-2004
Hello:

Does anyone have a sample of using the Microsoft TabStrip control in a
custom user control (ascx) ?

Please share code and/or URLs.

Thanks in adance

- Adwait

--
Adwait Ullal

w: http://www.adwait.com
j: http://finance.groups.yahoo.com/group/AdwaitsDotNetJobs
 
Reply With Quote
 
 
 
 
Adwait Ullal
Guest
Posts: n/a
 
      11-24-2004
Leon:

I am familiar with the usage of control however I am looking at using the
TabStrip control in a custom user control (ascx).

When I tried it, I got an error, which I will post tomorrow since I don't
have it available at the moment.

- Adwait

"Leon Friesema" wrote:

> On Mon, 22 Nov 2004 11:42:29 -0800, Adwait Ullal
> <(E-Mail Removed)> wrote:
>
> >Hello:
> >
> >Does anyone have a sample of using the Microsoft TabStrip control in a
> >custom user control (ascx) ?
> >
> >Please share code and/or URLs.
> >
> >Thanks in adance
> >
> >- Adwait

>
> - Compile using the readme.txt (using some alterations, but you'll get
> there)
> - Add the new DLL to the bin folder
> - Copy the Webctrl_client folder to the solution if necessary. The
> ..htc and image files need to be publicly available.
> - Add microsoft.web.ui.webcontrols to your references (don't know for
> sure if that is necessary, but do it anyway)
>
> - Add the following line to the top of the control:
>
> <%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls"
> Assembly="Microsoft.Web.UI.WebControls" %>
>
>
>
> - You could use this (never mind the Dutch words) in the control HTML
> designer
>
>
> <ie:TabStrip id="TabStrip1" runat="server"
> AutoPostBack="True"
> TabDefaultStyle="background-color:#0000CC;font-family:verdana;font-weight:bold;font-size:8pt;color:#ffffff;width:85;height:21;text-align:center"
> TabHoverStyle="background-color:#777777"
> TabSelectedStyle="background-color:silver;color:dimgray;border:1px
> solid black;">
> <ie:Tab Text="Nieuw"></ie:Tab>
> <ie:Tab Text="Open"></ie:Tab>
> <ie:Tab Text="Wachtende"></ie:Tab>
> <ie:Tab
> Text="Volgende versie "></ie:Tab>
> <ie:Tab Text="Gesloten"></ie:Tab>
> </ie:TabStrip></P>
>
> - Go to design mode; double click on your new tabStrip and a new event
> is created. etc.etc.
>
> Leon.
>

 
Reply With Quote
 
 
 
 
Adwait Ullal
Guest
Posts: n/a
 
      11-24-2004

Here is my TabStripHome.ascx:

<%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="uctab" TagName="tabStripHome"
Src="Controls/tabStripHome.ascx" %>
<%@ Page language="c#" Codebehind="default.aspx.cs" AutoEventWireup="false"
Inherits="CAMSRediLink._default" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>default</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<uctab:tabStripHome id="tabStripHome" runat="server"></uctab:tabStripHome>
</form>
</body>
</HTML>

Here is the default.aspx:

<%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="uctab" TagName="tabStripHome"
Src="Controls/tabStripHome.ascx" %>
<%@ Page language="c#" Codebehind="default.aspx.cs" AutoEventWireup="false"
Inherits="CAMSRediLink._default" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>default</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<uctab:tabStripHome id="tabStripHome" runat="server"></uctab:tabStripHome>
</form>
</body>
</HTML>


And here is the error I get:

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: The base class includes the field 'tabStripHome', but
its type (Microsoft.Web.UI.WebControls.TabStrip) is not compatible with the
type of control (ASP.tabStripHome_ascx).

Source Error:


Line 13: <body MS_POSITIONING="GridLayout">
Line 14: <form id="Form1" method="post" runat="server">
Line 15: <uctab:tabStripHome id="tabStripHome"
runat="server"></uctab:tabStripHome>
Line 16: </form>
Line 17: </body>


Source File: c:\inetpub\wwwroot\CAMSRediLink\default.aspx Line: 15


"Adwait Ullal" wrote:

> Leon:
>
> I am familiar with the usage of control however I am looking at using the
> TabStrip control in a custom user control (ascx).
>
> When I tried it, I got an error, which I will post tomorrow since I don't
> have it available at the moment.
>
> - Adwait
>
> "Leon Friesema" wrote:
>
> > On Mon, 22 Nov 2004 11:42:29 -0800, Adwait Ullal
> > <(E-Mail Removed)> wrote:
> >
> > >Hello:
> > >
> > >Does anyone have a sample of using the Microsoft TabStrip control in a
> > >custom user control (ascx) ?
> > >
> > >Please share code and/or URLs.
> > >
> > >Thanks in adance
> > >
> > >- Adwait

> >
> > - Compile using the readme.txt (using some alterations, but you'll get
> > there)
> > - Add the new DLL to the bin folder
> > - Copy the Webctrl_client folder to the solution if necessary. The
> > ..htc and image files need to be publicly available.
> > - Add microsoft.web.ui.webcontrols to your references (don't know for
> > sure if that is necessary, but do it anyway)
> >
> > - Add the following line to the top of the control:
> >
> > <%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls"
> > Assembly="Microsoft.Web.UI.WebControls" %>
> >
> >
> >
> > - You could use this (never mind the Dutch words) in the control HTML
> > designer
> >
> >
> > <ie:TabStrip id="TabStrip1" runat="server"
> > AutoPostBack="True"
> > TabDefaultStyle="background-color:#0000CC;font-family:verdana;font-weight:bold;font-size:8pt;color:#ffffff;width:85;height:21;text-align:center"
> > TabHoverStyle="background-color:#777777"
> > TabSelectedStyle="background-color:silver;color:dimgray;border:1px
> > solid black;">
> > <ie:Tab Text="Nieuw"></ie:Tab>
> > <ie:Tab Text="Open"></ie:Tab>
> > <ie:Tab Text="Wachtende"></ie:Tab>
> > <ie:Tab
> > Text="Volgende versie "></ie:Tab>
> > <ie:Tab Text="Gesloten"></ie:Tab>
> > </ie:TabStrip></P>
> >
> > - Go to design mode; double click on your new tabStrip and a new event
> > is created. etc.etc.
> >
> > Leon.
> >

 
Reply With Quote
 
Adwait Ullal
Guest
Posts: n/a
 
      11-26-2004
Leon:

Thanks ... that works.

- Adwait

"Leon Friesema" wrote:

> On Wed, 24 Nov 2004 14:01:10 -0800, Adwait Ullal
> <(E-Mail Removed)> wrote:
>
> >
> >Here is my TabStripHome.ascx:

> [BIG SNIPPET OF CODE #1]
> >
> >Here is the default.aspx:

> [BIG SNIPPET OF CODE #2]
> >
> >
> >And here is the error I get:
> >

> [BIG SNIPPET OF STACKTRACE]
> >
> >
> >"Adwait Ullal" wrote:
> >
> >> Leon:
> >>
> >> I am familiar with the usage of control however I am looking at using the
> >> TabStrip control in a custom user control (ascx).
> >>
> >> When I tried it, I got an error, which I will post tomorrow since I don't
> >> have it available at the moment.
> >>
> >> - Adwait
> >>
> >> >

>
> My (example) default.aspx
>
> <%@ Register TagPrefix="uc1" TagName="tabdebug" Src="tabdebug.ascx" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> <HTML>
> <HEAD>
> ---> etc, etc
> </HEAD>
> <body MS_POSITIONING="GridLayout">
> <form id="Form1" method="post" runat="server">
> <uc1:tabdebug id="Tabdebug1"
> runat="server"></uc1:tabdebug>
> </form>
> </body>
> </html>
>
>
> tabdebug.ascx:
> <%@ Control Language="c#" AutoEventWireup="false"
> Codebehind="tabdebug.ascx.cs" Inherits="tabdebug"
> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
> <%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls"
> Assembly="Microsoft.Web.UI.WebControls" %>
> <ie:TabStrip id="TabStrip1" runat="server"
> TabSelectedStyle="background-color:silver;color:dimgray;border:1px
> solid black;"
> TabHoverStyle="background-color:#777777"
> TabDefaultStyle="background-color:#0000CC;font-family:verdana;font-weight:bold;font-size:8pt;color:#ffffff;width:85;height:21;text-align:center"
> AutoPostBack="True">
> <ie:Tab Text="Tab1"></ie:Tab>
> <ie:Tab Text="Tab2"></ie:Tab>
> <ie:Tab Text="Tab3"></ie:Tab>
> </ie:TabStrip>
>
> tabdebug.ascx.cs:
> ..
> ..
> private void InitializeComponent()
> this.TabStrip1.SelectedIndexChange += new
> System.EventHandler(this.TabStrip1_SelectedIndexCh ange);
> ..
> ..
> private void TabStrip1_SelectedIndexChange(object
> sender, System.EventArgs e)
> {
> //DO something here
> }
>
>
>
>
> It seems to me, with the error you're recieving you try to use the
> TabStrip as some sort of base class.
> Anyway the example above works, so.
>
> gr.Leon.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Control to Control Other User Control Jonathan Wood ASP .Net 4 02-02-2010 03:41 PM
persisting changes to a control outside a user control from the user control? Mad Scientist Jr ASP .Net 0 03-22-2006 08:02 AM
Using Microsoft.Web.UI.WebControls-Tabstrip Control aparnasinha26@yahoo.com ASP .Net 1 07-20-2005 03:25 PM
Please help with handling events in a tabstrip/multipage/user control environment Aaron ASP .Net Web Controls 3 01-27-2005 10:15 PM
TabStrip in User Web Control Flynn Arrowstarr ASP .Net 1 11-27-2003 03:31 AM



Advertisments