473,808 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET 2.0 Custom Controls and Skins

I have a Custom Control which inherits from GridView.

I call it GridViewSort and it is in a namespace "PDS.WebControl s".

I add it to the Toolbox, drop it on my WebForm and it shows up and
works fine. But when I define a skinID for this Custom Control, I am
getting an error when it compiles.

I tried adding the Register directive in the skin file but that doesnot
help.

I have attached the following:
1.SkinID definition
2. Error Message

I see from the messages that the compiler fails on
GetType(PDS.Web Controls.GridVi ewSort).
I do not know how to resolve that.

Any help will be appreciated.

Thanks!
SkinID Definition:
<cc1:GridViewSo rt SkinID="Contrac tListings" runat="server" Width="760"
CellPadding="2" Cellspacing="0" BorderWidth="1p x" BackColor="Whit e"
BorderColor="#2 97B6B">
<HeaderStyle Font-Bold="True" Font-Underline="Fals e" ForeColor="Blue "
/>
</cc1:GridViewSor t>

Compiler Error Message: BC30002: Type 'PDS.WebControl s.GridViewSort' is
not defined.

Source Error:
Line 56: Private Shared __BuildControl_ _control14_skin Key As
Object =
System.Web.UI.P ageTheme.Create SkinKey(GetType (System.Web.UI. WebControls.Lab el),
"Rights")
Line 57:
Line 58: Private Shared __BuildControl_ _control15_skin Key As
Object =
System.Web.UI.P ageTheme.Create SkinKey(GetType (PDS.WebControl s.GridViewSort) ,
"ContractListin gs")
Line 59:
Line 60: Public Sub New()
Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb
Line: 58

Show Detailed Compiler Output:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE>
"c:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\vbc.exe" /t:library
/utf8output
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Xml\2. 0.0.0__b77a5c56 1934e089\System .Xml.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Web.Mo bile\2.0.0.0__b 03f5f7f11d50a3a \System.Web.Mob ile.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Drawin g\2.0.0.0__b03f 5f7f11d50a3a\Sy stem.Drawing.dl l"
/R:"c:\WINDOWS\M icrosoft.NET\Fr amework\v2.0.50 727\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Code.f-uu1gjt.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Config uration\2.0.0.0 __b03f5f7f11d50 a3a\System.Conf iguration.dll"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Web\2.0. 0.0__b03f5f7f11 d50a3a\System.W eb.dll"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Enterpri seServices\2.0. 0.0__b03f5f7f11 d50a3a\System.E nterpriseServic es.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Web.Se rvices\2.0.0.0_ _b03f5f7f11d50a 3a\System.Web.S ervices.dll"
/R:"c:\WINDOWS\M icrosoft.NET\Fr amework\v2.0.50 727\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\assembly\dl3 \17597bee\b29df b60_bf7ac601\PD SWebControls.DL L"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Data\2.0 .0.0__b77a5c561 934e089\System. Data.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System\2.0.0. 0__b77a5c561934 e089\System.dll "
/out:"c:\WINDOWS \Microsoft.NET\ Framework\v2.0. 50727\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.dll" /D:DEBUG=1
/debug+ /define:_MYTYPE= \"Web\"
/imports:Microso ft.VisualBasic, System,System.C ollections,Syst em.Collections. Specialized,Sys tem.Configurati on,System.Text, System.Text.Reg ularExpressions ,System.Web,Sys tem.Web.Caching ,System.Web.Ses sionState,Syste m.Web.Security, System.Web.Prof ile,System.Web. UI,System.Web.U I.WebControls,S ystem.Web.UI.We bControls.WebPa rts,System.Web. UI.HtmlControls
"c:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb "
"c:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.1.vb "
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.

c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb (58) :
error BC30002: Type 'PDS.WebControl s.GridViewSort' is not defined.

Private Shared __BuildControl_ _control15_skin Key As Object =
System.Web.UI.P ageTheme.Create SkinKey(GetType (PDS.WebControl s.GridViewSort) ,
"ContractListin gs")

~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~

c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb (69) :
error BC30002: Type 'PDS.WebControl s.GridViewSort' is not defined.

Me.__controlSki ns(__BuildContr ol__control15_s kinKey) = New
System.Web.UI.C ontrolSkin(GetT ype(PDS.WebCont rols.GridViewSo rt),
AddressOf Me.__BuildContr ol__control15)

~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~

c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb (427) :
error BC30002: Type 'PDS.WebControl s.GridViewSort' is not defined.

Dim __ctrl As PDS.WebControls .GridViewSort =
CType(ctrl,PDS. WebControls.Gri dViewSort)
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~

May 19 '06 #1
1 2292
I have been having the same problem, it looks to me as if when the
themes are compiled they are not inheriting the references from the
parent project (well lack of project in this case). Also if you look at
the debugger output you will see that the themes are being generated
using VB. I tried adding in an <%@ imports %> tag to import the correct
assembly but that generated an invalid tag error.

It looks to me as if the ASP.Net 2.0 themes are a massive hack added at
the last minute.

aspnet20vb_mike wrote:
I have a Custom Control which inherits from GridView.

I call it GridViewSort and it is in a namespace "PDS.WebControl s".

I add it to the Toolbox, drop it on my WebForm and it shows up and
works fine. But when I define a skinID for this Custom Control, I am
getting an error when it compiles.

I tried adding the Register directive in the skin file but that doesnot
help.

I have attached the following:
1.SkinID definition
2. Error Message

I see from the messages that the compiler fails on
GetType(PDS.Web Controls.GridVi ewSort).
I do not know how to resolve that.

Any help will be appreciated.

Thanks!
SkinID Definition:
<cc1:GridViewSo rt SkinID="Contrac tListings" runat="server" Width="760"
CellPadding="2" Cellspacing="0" BorderWidth="1p x" BackColor="Whit e"
BorderColor="#2 97B6B">
<HeaderStyle Font-Bold="True" Font-Underline="Fals e" ForeColor="Blue "
/>
</cc1:GridViewSor t>

Compiler Error Message: BC30002: Type 'PDS.WebControl s.GridViewSort' is
not defined.

Source Error:
Line 56: Private Shared __BuildControl_ _control14_skin Key As
Object =
System.Web.UI.P ageTheme.Create SkinKey(GetType (System.Web.UI. WebControls.Lab el),
"Rights")
Line 57:
Line 58: Private Shared __BuildControl_ _control15_skin Key As
Object =
System.Web.UI.P ageTheme.Create SkinKey(GetType (PDS.WebControl s.GridViewSort) ,
"ContractListin gs")
Line 59:
Line 60: Public Sub New()
Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb
Line: 58

Show Detailed Compiler Output:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE>
"c:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\vbc.exe" /t:library
/utf8output
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Xml\2. 0.0.0__b77a5c56 1934e089\System .Xml.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Web.Mo bile\2.0.0.0__b 03f5f7f11d50a3a \System.Web.Mob ile.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Drawin g\2.0.0.0__b03f 5f7f11d50a3a\Sy stem.Drawing.dl l"
/R:"c:\WINDOWS\M icrosoft.NET\Fr amework\v2.0.50 727\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Code.f-uu1gjt.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Config uration\2.0.0.0 __b03f5f7f11d50 a3a\System.Conf iguration.dll"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Web\2.0. 0.0__b03f5f7f11 d50a3a\System.W eb.dll"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Enterpri seServices\2.0. 0.0__b03f5f7f11 d50a3a\System.E nterpriseServic es.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Web.Se rvices\2.0.0.0_ _b03f5f7f11d50a 3a\System.Web.S ervices.dll"
/R:"c:\WINDOWS\M icrosoft.NET\Fr amework\v2.0.50 727\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\assembly\dl3 \17597bee\b29df b60_bf7ac601\PD SWebControls.DL L"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Data\2.0 .0.0__b77a5c561 934e089\System. Data.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System\2.0.0. 0__b77a5c561934 e089\System.dll "
/out:"c:\WINDOWS \Microsoft.NET\ Framework\v2.0. 50727\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.dll" /D:DEBUG=1
/debug+ /define:_MYTYPE= \"Web\"
/imports:Microso ft.VisualBasic, System,System.C ollections,Syst em.Collections. Specialized,Sys tem.Configurati on,System.Text, System.Text.Reg ularExpressions ,System.Web,Sys tem.Web.Caching ,System.Web.Ses sionState,Syste m.Web.Security, System.Web.Prof ile,System.Web. UI,System.Web.U I.WebControls,S ystem.Web.UI.We bControls.WebPa rts,System.Web. UI.HtmlControls
"c:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb "
"c:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.1.vb "
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.

c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb (58) :
error BC30002: Type 'PDS.WebControl s.GridViewSort' is not defined.

Private Shared __BuildControl_ _control15_skin Key As Object =
System.Web.UI.P ageTheme.Create SkinKey(GetType (PDS.WebControl s.GridViewSort) ,
"ContractListin gs")

~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~

c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb (69) :
error BC30002: Type 'PDS.WebControl s.GridViewSort' is not defined.

Me.__controlSki ns(__BuildContr ol__control15_s kinKey) = New
System.Web.UI.C ontrolSkin(GetT ype(PDS.WebCont rols.GridViewSo rt),
AddressOf Me.__BuildContr ol__control15)

~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~

c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\etchweb2\ 7dbaa6bc\543bc0 72\App_Theme_PD S.sexg2wte.0.vb (427) :
error BC30002: Type 'PDS.WebControl s.GridViewSort' is not defined.

Dim __ctrl As PDS.WebControls .GridViewSort =
CType(ctrl,PDS. WebControls.Gri dViewSort)
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~


May 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2614
by: Somesh Bartakkay | last post by:
I recently seen a small GUI program with Skins allplied. the library used for that is Activeskin. i wanna know weather Any GUi-Skins are available for pythons GUI ? or how to use the activeskins for python gui(say ANy )??
7
3021
by: Shimon Sim | last post by:
I have a custom composite control I have following property
2
2599
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a good while and I'm getting really frustrated now! My problem is this - my custom controls periodically disappear from my
2
1882
by: J R M | last post by:
I've developed a custom control (it's basically a drop-down list and then a couple of textboxes to include meta-data for the selection) that I'm embedding into another custom control (the idea is to allow a dynamic number of control1 to appear in control2). Everything renders correctly, however I could never retrieve data on postback from my embedded controls. Upon closer inspection, all of the embedded controls output without any "name"...
4
1346
by: sean_mcad | last post by:
We are starting to standardize what we have been doing with our web applications and I have a “cost-benefit” question when it comes to some server controls. Main two examples is Plain text vs. <asp:label /and <divvs <asp:panelsfor current static information. In my view if we go ahead and make all things static into server controls anyway then we have the advantage of things like localization, skins and
15
6541
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
2
1437
by: Ron | last post by:
I would like some more information on custom controls, what they can do and things like that, what you would use them for etc... Can anyone here share some examples of what you have used a custom control for and possibly email a zip file with that control so I could run it in a program to see how it worked? to pts4560 <atyahoo.com ? thanks.
11
6623
by: New Bee | last post by:
Hi, I have been looking at Themes and Skins today and now resonably understand how they work at a ground level. But I have a couple of questions. 1. ) StyleSheetTheme I dont understand where this would be used. As I understand it the precidence is like this.
6
2855
by: Cirene | last post by:
Im thinking about purchasing the RadControls for ASP.NET AJAX, by Telerik. Any advice, suggestions, or opinions? What has been your experience? Link: http://www.telerik.com/products/aspnet-ajax/overview.aspx The same goes for Devexpress. I'm thinking of purchasing their ASPxScheduler Stuite. Any experience with their products? Are they solid and good performance? Link: ...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.