I am new to .Net. I am trying to create the tabs similar to Time Tracker Starter Kit. I am using the WebMatrix for my development. I had creted TabItem.VB program, Banner.ascx and tt.aspx TabItem.VB : This is the exact copy of the TabItem.VB of Time Tracker
except Namespace. I had give different name for the Namespace. Banner.ascx : This control contains the banner information. tt.aspx : Banner.ascx is registered here. I am getting following Error : BC30002: Type 'TabItem' is not defined. ' ( Error line # 14
) tabItems.Add(New TabItem("Reports", "Reports.aspx?index=" & tabItems.Count)) Source File: C:\Inetpub\wwwroot\IT\Banner.ascx line 14 How can we create the .dll file using webmatrix. Do I need to register this class? if yes then how? I think I am missing something...
Any help is greatly appreciated.. Thanks...
My first thought is did you import the namespace that the tabitem is in? Unless all of your files are under the exact same namespace, you need to have Import at the top of the banner.ascx.vb file. If this isn't the problem, you'll likely have to post a bit
more of the code for us to know what the problem is. HTH
Thanx HTH.. Yes I am importing the Namespace. Here are 3 files which I am using. ------------------------------------------------------------------------------------------------------------ ' TabItem.vb ' ========= Imports System Namespace IT.ITBusinessLogicLayer
Public Class TabItem Private _name As String Private _path As String Public Sub New(ByVal newName As String, ByVal newPath As String) _name = newName _path = newPath End Sub 'New Public Property Name() As String Get Return _name End Get Set(ByVal Value As
String) _name = value End Set End Property Public Property Path() As String Get Return _path End Get Set(ByVal Value As String) _path = value End Set End Property End Class End Namespace ------------------------------------------------------------------------------------------------------------
' Banner1.ascx '========== <script runat="server"> Private Sub Page_Load(sender As Object, e As System.EventArgs) Dim tabItems As New ArrayList() ' Always add the Log tab (all users can see this tab) 'tabItems.Add(New TabItem("Log", "TimeEntry.aspx?index="
& tabItems.Count)) 'If TTSecurity.IsInRole(TTUser.UserRoleAdminPMgr) Then tabItems.Add(New TabItem("Reports", "Reports.aspx?index=" & tabItems.Count)) tabItems.Add(New TabItem("Administration", "ProjectList.aspx?index=" & tabItems.Count)) 'End If tabs.DataSource
= tabItems tabs.SelectedIndex = IIf(Request("index") Is Nothing, 0, Convert.ToInt32(Request("index"))) tabs.DataBind() End Sub 'Page_Load </script>
I am having the same issue. I am trying to use the tabs from the time traker example. I got the darn thing to work once by compiling the TabItem.cs file which would be the .vb file for you. compile comand: csc /t:library /r:System.dll;System.Web.dll /out:bin/First.dll
First.cs after compiling I put the .dll file in the bin folder of my web project. and it worked. I went home and tried the same thing and i get an error. and now every time after that i get an error. I am not using VS. I am using DreamweaverMX
kaustubh
Member
45 Points
9 Posts
BC30002: Type 'TabItem' is not defined.
Aug 04, 2003 05:26 PM|LINK
daccardo
Contributor
3040 Points
608 Posts
Re: BC30002: Type 'TabItem' is not defined.
Aug 04, 2003 07:07 PM|LINK
kaustubh
Member
45 Points
9 Posts
Re: BC30002: Type 'TabItem' is not defined.
Aug 04, 2003 07:35 PM|LINK
jgreer
Member
20 Points
4 Posts
Re: BC30002: Type 'TabItem' is not defined.
Aug 04, 2003 09:10 PM|LINK