|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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. 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/ Show quoteHide quote "Electrified Research" <researc***@electrified.net> wrote in message news:1128983376.848135.290350@g14g2000cwa.googlegroups.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. > <snip />
Sorry, I forgot to explain, the Master Page becomes the user control. <%= Clinton Gallagher So you can use Master Pages as Master User Controls and not just Pages?
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. :-) -- Show quoteHide quoteGregory 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? > > > 1. Is there some magical new way to do this in ASP.NET 2.0 and have it No magical way. The Master Page functionality sets up a "server control" > show up nice in Design Mode? 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 I know of no way to set up a control that allows drag and drop and renders > like template which Design Mode will render nicely. 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. -- Show quoteHide quoteGregory 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. > >
Other interesting topics
Someone Has To Have An Answer ???
submit button - custom javascript IIS 6.0 Event 1074 SqlDataSource - strange error (to me at least) ;-) Set Label Font? HTML mail does not work? ActiveDirectoryMembershipProvider ASP.NET 2.0 Which account neets permission to read the Registry key. SKMMenu and SSL Permission for bin folder: ASP.NET app deployed under a web site |
|||||||||||||||||||||||