473,837 Members | 1,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nested Masters, User Controls, and VS2005

Okay, another problem I'm having with nested master pages on VS 2005.

I've got a MasterPage,mast er, as SubMaster.maste r, and a
DesignTime.mast er, and a content page, default.aspx.

The DesignTime master is a single level master page incorporating both
the content of the MasterPage and the SubMaster, so that I can get
around the fact that you can't see content pages in Design mode if
they use nested masters.

And, of course, you can't see the content of the SubMaster in design
mode at all.

I've created a User Web Control, CategoryList.as cx, which incorporates
a drop downlist, a GridView, and a DataSource.

I can drag that UserControl on to my DesignTime.mast er file (in design
view), and into my default.aspx file in design view, and both of them
build just fine. But when I go into either of them in source view and
copy and paste the line of code into SubMaster.maste r (since I can't
open it in Design View), I get an error.

The markup that is generated when I drag the User Control is
"<uc1:CategoryL ist ID="CategoryLis t1" runat="server" />"

When I cut and paste that markup in SubMaster.maste r, I immediately
get an error displayed "Unrecogniz ed tag prefix or device filter
'uc1'" That's without even attempting to build it. (When I try to
build it, it also adds "Unknown server tag 'uc1:CategoryLi st'.")

Is there anyway around this?
Jul 22 '08 #1
1 2071
On Jul 21, 11:32 pm, daveh551 <gee...@gmail.c omwrote:
Okay, another problem I'm having with nested master pages on VS 2005.

I've got a MasterPage,mast er, as SubMaster.maste r, and a
DesignTime.mast er, and a content page, default.aspx.

The DesignTime master is a single level master page incorporating both
the content of the MasterPage and the SubMaster, so that I can get
around the fact that you can't see content pages in Design mode if
they use nested masters.

And, of course, you can't see the content of the SubMaster in design
mode at all.

I've created a User Web Control, CategoryList.as cx, which incorporates
a drop downlist, a GridView, and a DataSource.

I can drag that UserControl on to my DesignTime.mast er file (in design
view), and into my default.aspx file in design view, and both of them
build just fine. But when I go into either of them in source view and
copy and paste the line of code into SubMaster.maste r (since I can't
open it in Design View), I get an error.

The markup that is generated when I drag the User Control is
"<uc1:CategoryL ist ID="CategoryLis t1" runat="server" />"

When I cut and paste that markup in SubMaster.maste r, I immediately
get an error displayed "Unrecogniz ed tag prefix or device filter
'uc1'" That's without even attempting to build it. (When I try to
build it, it also adds "Unknown server tag 'uc1:CategoryLi st'.")

Is there anyway around this?
Sorry for the bandwidth. I found the answer. I copied the markup
code from the body of the page, but I didn't know about the @Register
directive at the top, so I wasn't copying it. Once I did, it worked
fine.
Jul 22 '08 #2

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

Similar topics

3
1960
by: Guadala Harry | last post by:
I have this scenario: ASPX Page dynamically loads userControl1 - which in turn dynamically loads userControl2. UserControl2 contains a TextBox Web Server control. When a user clicks a button in the ASPX page (not in either user control), a Postback occurs during which I'd like to retrieve the Text property value of the TextBox control. I have plenty of examples to work from that show how to retrieve a property value of a user control...
5
5337
by: ~~~ .NET Ed ~~~ | last post by:
Hi, As you all know when an ASP.NET web form is created that will include web controls and such, it contains a FORM that that identifies the web form and its containing controls. Well, I have a web form who has several other (user & custom) controls, these are enclosed within the standard FORM tag. Additionally *some* of these user controls are actually forms as well. This results into nested Forms.
2
1699
by: nulldevice | last post by:
I've got a datagrid with some nested controls, created at design-time. The controls themselves have no databound values. After a few other operations on the page (selecting a few parameters, etc), a button is clicked and the databind occurs. This part works fine. It retreives the 4-10 rows it needs and using the itemdatabound formats everything nicely. What I intend to do then, is after the user has gone through the nested controls...
20
10840
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of either an option button plus two text fields or a checkbox plus two text fields Am wanting to save the user entries into an underlying table. Tag property for each option button, check box or text field has the value of the key
3
1709
by: Rolf Welskes | last post by:
Hello, for a large web site project we would like to use nested Master Pages. Unfortunely VS2005 is not able to show pages in design mode when nested Master pages are used. This has the consequence that also each content page cannot be used in design mode. It is impossible to design hundrets of pages in source mode without design
2
1729
by: aarf | last post by:
Does anyone have an opinion or fact if nested user controls are a best practice, especially if you want performance from the page? I've seen pages that nest about 4 levels of user controls. Thanks
2
2419
by: brad | last post by:
Group, I'm using Visual Studio 2003 to create an ASP.NET 1.1 project which contains nested server user controls in order to create a tree-like hierarchy. The tree is a sort of question and answer dialog. The user answers a question, and the next subquestion appears (using dynamic html display:none|block) depending on his answer.
2
1894
by: Sebastian Paul | last post by:
Hi, I have a user control (EventStructureSelector) used in another user control (ResultsMenu). The class EventStructureSelector defines a public type (ModeType), that is used for one of its properties (Mode). The class ResultsMenu sets the property of the nested control during the PageLoad event. No big thing for now.
1
1182
by: shapper | last post by:
Hello, I am using ASP.NET 3.5 and VS 2008 to create 2 level Nested Master pages. I am adding the controls and the content place holders at runtime. However now my child pages do not recognize the master pages content place holders. How can I solve this?
0
9696
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
10902
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
10583
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
10642
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
10288
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
7824
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
7014
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
5863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4062
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.