473,408 Members | 2,888 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,408 software developers and data experts.

Master Pages Great! But what about Master User Controls?

>From ASP.NET 1.1 I have a very useful UserControl which acts like a
template control. I call it a CustomTemplate.

Basically it gives me a re-usable look to sections of the site without
having to tinker with HTML. This is very much like what is being done
by Master Pages but with a User Control.

I have a two part question:
1. Is there some magical new way to do this in ASP.NET 2.0 and have it
show up nice in Design Mode?
2. If not how can I create a re-usable, easy as editing a UserControl
like template which Design Mode will render nicely.

Thanks.

Nov 19 '05 #1
5 1343
They claim Master Pages are supported in the designer but that has proven a
partial truth.
For example, nested Masters do not render in the designer. Other aspects of
page design such as the use of various uses of CSS will not render in the
designer either. Its a bit disconcerting at first but I've become used to
it.

The answer to your second question is to put your water wings on and jump in
but be prepared to live the life of the pioneering spirit.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Electrified Research" <re********@electrified.net> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
From ASP.NET 1.1 I have a very useful UserControl which acts like a

template control. I call it a CustomTemplate.

Basically it gives me a re-usable look to sections of the site without
having to tinker with HTML. This is very much like what is being done
by Master Pages but with a User Control.

I have a two part question:
1. Is there some magical new way to do this in ASP.NET 2.0 and have it
show up nice in Design Mode?
2. If not how can I create a re-usable, easy as editing a UserControl
like template which Design Mode will render nicely.

Thanks.

Nov 19 '05 #2
<snip />

Sorry, I forgot to explain, the Master Page becomes the user control.

<%= Clinton Gallagher
Nov 19 '05 #3
So you can use Master Pages as Master User Controls and not just Pages?

Nov 19 '05 #4
> 1. Is there some magical new way to do this in ASP.NET 2.0 and have it
show up nice in Design Mode?
No magical way. The Master Page functionality sets up a "server control"
that renders the common elements. The IDE rendering the control is based
solely on the programmers allowing this. There is currently no magic way to
set up your own control to do this. Migrating to a master page would be the
easiest, if possible.

If not possible, consider creating a compiled server control, as it will
render, according to the Render() method, in the IDE. YOu can then template
the Page and start using your new page template for all new pages.
2. If not how can I create a re-usable, easy as editing a UserControl
like template which Design Mode will render nicely.


I know of no way to set up a control that allows drag and drop and renders
in the design surface. Perhaps this is something Microsoft can look at in the
future. Barring that, you would have to create your own designer for your
custom control, which is a lot of work if you ask me.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Electrified Research" wrote:
From ASP.NET 1.1 I have a very useful UserControl which acts like a

template control. I call it a CustomTemplate.

Basically it gives me a re-usable look to sections of the site without
having to tinker with HTML. This is very much like what is being done
by Master Pages but with a User Control.

I have a two part question:
1. Is there some magical new way to do this in ASP.NET 2.0 and have it
show up nice in Design Mode?
2. If not how can I create a re-usable, easy as editing a UserControl
like template which Design Mode will render nicely.

Thanks.

Nov 19 '05 #5
No exactly. Master pages are coded like user controls and inherit from the
control hierarchy in the BCL. That is what Clinton was talking about.

There is no master user control set up, but it is a good idea for future
endeavors. :-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Electrified Research" wrote:
So you can use Master Pages as Master User Controls and not just Pages?

Nov 19 '05 #6

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

Similar topics

11
by: johnston | last post by:
We have over 100 asp pages that reference a table (distribution_components). We added a new column and primary key to that table, so now we have to modify the where clause to include that column...
2
by: Smoothice | last post by:
Can anyone tell me how to do this I am very new and experimenting with asp.net using vb I want to have to different buttons that load and pass data to different pages depending on the button...
3
by: Kevin | last post by:
Hi guys, I want to refresh some pages every 2 seconds. however, these html pages are not in my site, they could be any pages from yahoo.com or msn.com. I can create a page, which redirect to...
3
by: visu | last post by:
I am currently working on my personl website a completely DB driven web application. in that i ve updating the images thru my admin panel .. but i am getting the old images not the update one when...
1
by: nsteele84 | last post by:
Hi I have just set up my apache webserver with PHP4, openssl, modssl, mysql etc. Everything works fine on the non ssl side but when I try to open a php page on the ssl side the browser displays...
1
by: flashadow | last post by:
Who can explain. Can JsUnit test dynamic pages? A site uses Apache Tomcat for the start. A site consists of starting page in which is loaded 4 jsp pages. Functions that need testing take...
2
by: bling via DotNetMonster.com | last post by:
greetings fellow programmers!! im kinda new in vb.net and i need your professional help! im using DSOframer to open .doc files but i disabled the menubar and toolbar because i just want to show...
0
by: =?Utf-8?B?Q2hyaXN0b3BoZXI=?= | last post by:
We have a web product built on ASP.NET v2.0 which we are preparing a release on ASP.NET v3.5 Many of our customers have added custom pages inside our product (which we call Modules) built on...
0
by: =?Utf-8?B?Q2hyaXN0b3BoZXI=?= | last post by:
We have a web product built on ASP.NET v2.0 which we are preparing a release on ASP.NET v3.5 Many of our customers have added custom pages inside our product (which we call Modules) built on...
5
by: manish | last post by:
HI I want a jawascript that will search pages from only my subdomain website eg. abc.efg.com can anyone help me please give the exact jawascript as I am not an expert programmer please if...
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...
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...
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.