473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Can't declare a usercontrol in a Class

ad
We can declarre a web controls in a class, like:

public class HealthClassBase: System.Web.UI.Page
{
public TextBox myTextBox;
.......
But if TUserControl is a Web UserControl.
When I declare it in a class like:

public class HealthClassBase: System.Web.UI.Page
{
public TextBox myTextBox;
Public TUserControl myUserControl..

it fail in compile time.

How can I do ?
Nov 17 '05 #1
2 1457
hi

you should be able to do so, My bet is that you forgot to reference the
assembly:

using MyAssembly;

what is the compiler error anyway?
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:OU***************@TK2MSFTNGP10.phx.gbl...
We can declarre a web controls in a class, like:

public class HealthClassBase: System.Web.UI.Page
{
public TextBox myTextBox;
.......
But if TUserControl is a Web UserControl.
When I declare it in a class like:

public class HealthClassBase: System.Web.UI.Page
{
public TextBox myTextBox;
Public TUserControl myUserControl..

it fail in compile time.

How can I do ?

Nov 17 '05 #2
hi

you should be able to do so, My bet is that you forgot to reference the
assembly:

using MyAssembly;

what is the compiler error anyway?
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:OU***************@TK2MSFTNGP10.phx.gbl...
We can declarre a web controls in a class, like:

public class HealthClassBase: System.Web.UI.Page
{
public TextBox myTextBox;
.......
But if TUserControl is a Web UserControl.
When I declare it in a class like:

public class HealthClassBase: System.Web.UI.Page
{
public TextBox myTextBox;
Public TUserControl myUserControl..

it fail in compile time.

How can I do ?

Nov 17 '05 #3

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

Similar topics

0
by: ad | last post by:
We can declarre a web controls in a class, like: public class HealthClassBase: System.Web.UI.Page { public TextBox myTextBox; ....... But if TUserControl is a Web UserControl. When I...
1
by: S Guiboud | last post by:
I want to subclass the System.Web.UI.UserControl to make a common control for my site. Then, when I create a new UserControl from the Visual Studio I changed the base class...
5
by: Jim Hubbard | last post by:
I have created a simple usercontrol that adds functionality to the webbrowser control (let's call it ctrl1). I would like to add it to another usercontrol I am creating (let's call it ctrl2), but...
2
by: mharness | last post by:
Hello, I've tried a number of examples showing how to read the properties of a user control from an aspx file where the code is on the html view of the form but I can't figure out how to read...
2
by: lotus | last post by:
HI All.. I'm realtively new to C#. I have MainForm which includes Parent usercontol, and this parent usercontrol also contains child usercontrol. MainForm --> Parent usercontrol --> child...
2
by: tbh | last post by:
hi, hope this cross-post is OK. it's unclear to me whether this question belongs more under vstudio or dotnet... i'm using VS2005 pro and am one co-developer of a web solution that is getting to...
5
by: billsahiker | last post by:
I saw one post here that basically said no way, but not sure which vs version was being discussed. Using vs 2005 I develped a user control in a vb project and would like to use that usercontrol in...
13
by: Screaming Eagles 101 | last post by:
Hi, I have a solution containing two projects - main project with main form containing a statusstrip - second project containing a usercontrol. I have added the usercontrol to my main form,...
2
by: Andrew Backer | last post by:
I hope someone out there can help me with this, because I am stuck. My problem is that I have an instance of a generic class, but I don't know ahead of time what the type parameter used was. In...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.