473,666 Members | 2,237 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Newbee question on inheriting an user control?

Hi,

I have one user control named Schedule.ascx, I want to create another
control which is quite similar to schedule.ascx but differs in some methods
and some UI elements, the way I am doing it right now, I save schedule.ascx
as another name, say schedule2.ascx then I go to code behind and chane the
class name and the methods I like to change. Also modify the UI on ascx
file.

This is working. But there is a problem, evertime I change Scedule.ascx ,
either method and UI , I have to copy it to schedule2.ascx. Is there a
better way to do this? I imagine inheritance could help, just don't know
how to apply to this case.

TIA

Nov 19 '05 #1
1 1346
You're saying you have to copy it to Schedule2.ascx. But you did'nt mention
Why. Are you recieving an error?

"Danny Ni" <dn*@yahoo.co m> wrote in message
news:uv******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi,

I have one user control named Schedule.ascx, I want to create another
control which is quite similar to schedule.ascx but differs in some methods and some UI elements, the way I am doing it right now, I save schedule.ascx as another name, say schedule2.ascx then I go to code behind and chane the
class name and the methods I like to change. Also modify the UI on ascx
file.

This is working. But there is a problem, evertime I change Scedule.ascx ,
either method and UI , I have to copy it to schedule2.ascx. Is there a
better way to do this? I imagine inheritance could help, just don't know
how to apply to this case.

TIA

Nov 19 '05 #2

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

Similar topics

3
2660
by: thechaosengine | last post by:
Hi all, I wanted to put some common security functions into a class that inherits from the Page class and then use the new class as the basis for all my pages. Unfortunately, if I try and inherit from my new SecurePage class and not the old Page class, the designer breaks and will only allow me into html mode. Bugger. The error message given is:
4
2616
by: cmc | last post by:
I need some clarification to help me understand the DB2 strucure more. The questions are about "implicit schema" 1. This is a very interest concpet that DB2 let every user to create new schema (as this is part of the PUBLIC group privilege - if I am not wrong). From a practical stand point, what is the application of such concept. 2. Suprisingly, if the schema is an implicitly created, everyone else can create objects in it too. What...
2
1407
by: Kevin Blackwell | last post by:
This is probably a basic c# question, but I'm having problems with it. I currently have a project that contains two classes. From the calss view. Class1 Class2 I have included a usercontrol in class 2. I dropped the control into a form in class one. What I'm looking to do is fill a control's text box with information from Class1.
5
1246
by: DotNet | last post by:
I'm trying to construct a header user control and would like to pass an integer to the control in order to display the correct on state for a menu. How does one pass an integer from an .aspx page to an .ascx page when the page loads? Thanks.
0
1347
by: z. f. | last post by:
Hi, I'm not so familiar with control inheriting, but what i need is very simple (should be) and requires only deep knowledge with implementing control inheritence. is it possible (might someone post a sample / link to sample) to implement a control inheriting from the repeater / date grid / data list, that as well as implementing those control properties (HTML-side properties) implements also a <no items template> that will accept...
1
1708
by: Mick | last post by:
Hi, Is it possible for an asp repeater control to repeat ascx control ? If Yes, any sample would be appreciated. ^^ Thks for help
2
1964
by: Arvind | last post by:
I am trying to inherit an User Control from one another User Control in ASP.Net 2.0. Since we have partial classes in ASP.Net 2.0, this restricts me when I try to do the same. I am using the code chunk below to inherit. public partial class DerivedUserControl_ascx : BaseUserControl_ascx Where BaseUserControl_ascx is the base User Control and DerivedUserControl_ascx is the derived User Control.
2
1807
by: Charles Law | last post by:
I want a set of controls that all have a border, like a group box. I thought I would create a base control containing just a group box from which my set of controls could inherit. Assuming that this is the right approach (please tell me if it is not), how then do I make it so that the group box cannot be moved around on my set of controls, but is also able to act as container for other controls? If I leave the modifier of the group box...
9
1921
by: Dominique | last post by:
I'm trying to create a C# composite control and have inherited from UserControl. This new control contains 9 buttons with images on them ( no text ). Firstly, what is the best way to expose these 9 buttons to the developers who will be using my control. I want them to be able to change visibility, enablement, onClick etc for each button, but not be able add any new buttons. I initially thought of exposing them as some kind of fixed...
0
8355
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
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
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...
0
8638
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6191
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
5662
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
4365
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2769
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
1769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.