473,786 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual inheritance...


Hi folks,

I've got a page that contains the basic formatting that I need for pretty
much all of my systems pages. It's compiled into it's DLL, distributed to
my application's \bin folder and VS allows me to use the class thus :

Public Class Job
Inherits DefaultPage.Def aultPage

The application compiles and runs and is generally happy, but my formatting
isn't there.

There isn't any functionality in the base class, just formatting (header
graphics and couple of hyperlinks).

Can someone point me in the right direction? Is it even possible, or should
I just stick with an HTML includes reference?

Thanks in advance...

P
Nov 18 '05 #1
1 1176
What you want is going to be in ASP.NET 2.0 (Whidbey). For now, you can use
ASCX controls to put in distinct bits of visual information (a control for
the header, a control for the side bar, etc.). You can also pump that in
using the inheritance method, but it's going to be a bit tougher. Remember,
the actual page that is rendered is based on the aspx declarative page,
which inherits from your code behind, which inherits from your base class.
In order to render successfully, you could have something like (VERY much
pseudocode):

page.aspx - inherits from page.aspx.cs:
<asp:PlaceHolde r id="header">
my content here
<asp:PlaceHolde r id="footer">

page.aspx.cs - inherits from BasePage class
....

BasePage.cs
protected System.Web.UI.W ebControls.Plac eHolder header;
protected System.Web.UI.W ebControls.Plac eHolder footer;
header.Controls .Add(/* some nice visual bits here */);
footer.Controls .Add(/* some nice visual bits here */);

As you can start to see, you will be doing visual designing without a
designer or even a declarative syntax - not much fun. I would go the ASCX
route until Whidbey comes out. :-)

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Paul M" <ma****@trials. bham.ac.uk> wrote in message
news:uK******** ******@TK2MSFTN GP10.phx.gbl...

Hi folks,

I've got a page that contains the basic formatting that I need for pretty
much all of my systems pages. It's compiled into it's DLL, distributed to
my application's \bin folder and VS allows me to use the class thus :

Public Class Job
Inherits DefaultPage.Def aultPage

The application compiles and runs and is generally happy, but my formatting isn't there.

There isn't any functionality in the base class, just formatting (header
graphics and couple of hyperlinks).

Can someone point me in the right direction? Is it even possible, or should I just stick with an HTML includes reference?

Thanks in advance...

P

Nov 18 '05 #2

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

Similar topics

2
3094
by: Matt | last post by:
I have created an MDI child form that I am using as a base form in a VB.Net MDI application. The base MDI child form has a series of menu options on it. I then use this form to create other MDI child forms (using inheritance). The problem is that the derived MDI child form's menu options don't seem to have inherited the functionality from the base form (i.e. the inherited menu options don't work). If I place a command button or other...
1
8011
by: Jason Hickey | last post by:
Has there been a change in the way the UI designer handles winform inheritance in the 2003 version of visual studio. Consider the following (try it if you are using 2003 Everything seems to work under 2002) Create a form and add two buttons (bottom right) and a panel (fill the top of the form) Anchor the buttons to the bottom right and anchor the panel to top bottom left and right. set all three controls access level to protected
30
1956
by: Elhanan | last post by:
hi all i have a question in desgning a form.. the application in question is something a indexing station. the user in this indexing station views a document in pdf/tiff format on the right side of the form and enters the index data through various fields and listboxes on the left side.
2
3219
by: Mr Wizard | last post by:
I am going through the front controller http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/ImpFrontControllerInASP.asp and all works well except when the server.transfer occurs. I get invalid IsPostBack results which I believe can fixed using the patch in KB:821156. How do I get this patch? Another question in the same pattern is when using LoadConrol to load a .ascx file I get "maps to another application,...
10
1409
by: Gopal Prabhakaran | last post by:
Hi Pls Help me to do Visual Inheritance with ASP.NET -- Thanx Gopal Prabhakaran
6
2102
by: VR | last post by:
Hi, I read about Master Pages in ASP.Net 2.0 and after implementing some WinForms Visual Inheritance I tryed it with WebForms (let's say .aspx pages, my MasterPage does not have a form tag itself so, cannot be called a WebForm itself, the child pages will implement forms). I created a Master.aspx page and removed all HTML from it, added some code to the .aspx.vb file to add controls to my page. Then I created a Child.aspx and changed the...
6
1301
by: Bart Schelkens | last post by:
Hi, i've created a base-form from which all the forms in my application need to inherit. This works just fine. I've put some buttons on my base-form. They are displayed correctly, only if my inheriting form is bigger than my base-form, the buttons stay at the position where i've put them on my base-form.
2
2195
by: Ray Cassick \(Home\) | last post by:
Since I got such good feedback from the Xml comments question I will ask this of the group as well. Is VS.NET 2005 handling the visual inheritance problems centered around controls and forms that are decorated with MustInherit any better than 2003 did? I am getting really tired of having to do the good old '#If DEBUG Then' workaround just to get by this.
3
1363
by: Dino Buljubasic | last post by:
Hi, I am thinking of using visual inheritance. I am using C# VS 2005. I am concerned about how good it is. I have heard about problems like controls dissapearing or so. Any hints, tips, ideas, concerns ??? Thank you, _dino_
0
9492
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
10360
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
10163
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
10108
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,...
0
9960
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...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
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
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3668
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.