473,385 Members | 1,730 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,385 software developers and data experts.

Subclassing a user control containing UI elements

Hi:

When I derive a new user control from an existing user control that contains
UI elements (buttons, textboxes, etc.) and put derived control on a form, UI
elements don't appear when I run the form. Why doesn't derived control
inherit them?

Thanks,
Charlie
Nov 19 '05 #1
1 1273
A derived control will only inherit the codebehind portion. The UI elements
in the .ascx file, postion, etc, are not actually in your (base) class. The
..ascx is "married" to your codebehind on the first time the page is
requested.

If you need to inherit all functionality and UI elements, you should look at
moving to a server control, but there is no GUI for design time UI element
positioning.

HTH,

bill
"Charlie@CBFC" <ch*****@comcast.net> wrote in message
news:OR**************@TK2MSFTNGP10.phx.gbl...
Hi:

When I derive a new user control from an existing user control that contains UI elements (buttons, textboxes, etc.) and put derived control on a form, UI elements don't appear when I run the form. Why doesn't derived control
inherit them?

Thanks,
Charlie

Nov 19 '05 #2

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

Similar topics

3
by: Mizrandir | last post by:
I'd like to subclass numarray's array. I'd like to add some methods and override others like __init__. I don't know how to do this and haven't found help searching the manual or the web, can...
3
by: Scott McChesney | last post by:
Folks - I've done some searching on the 'net, and I think I know the answer to my question, but I wanted to pose it anyway, just in case. I'm embarking on a new project, and we're...
11
by: trinitypete | last post by:
Hi all, I have a user control that uses control literal to build a heading with a link, and a div containing links below. As the link heading is hit, I want to change the style of the div,...
2
by: TheStripe | last post by:
Hello all, Wondering if anyone has come across this problem I am having.. I am Subclassing a RadioButtonList to add some properties that I need. I am building up a table and adding to a...
3
by: Trammel | last post by:
Hi, I recently upgraded to VB.net from VB6.. and woah... I feel lost :¬O One of my reasons for upgrading is I was told that VB.net can do class inheritance and subclassing easier. ...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
1
by: AndiSmith | last post by:
Hi guys, I wondered if anyone could help me with this problem, or even shed some light on the direction I need to take to resolve it? I'm using .NET 2.0 (C# flavor) to build a large user-based...
1
by: Efi Merdler | last post by:
Hi, I created a user control, but instead of handling exception in the user control level I prefer to handle them in the containing form. In the load event of the containing form I'm using:...
5
by: Fred Chateau | last post by:
I am trying to reference a server control in a user control, from the containing page. Is there a way to do that? I have tried "UserControl1.FindControl("ControlName")" but I get a null reference....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.