473,394 Members | 1,854 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,394 software developers and data experts.

Nested Masters, User Controls, and VS2005

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

I've got a MasterPage,master, as SubMaster.master, and a
DesignTime.master, 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.ascx, which incorporates
a drop downlist, a GridView, and a DataSource.

I can drag that UserControl on to my DesignTime.master 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.master (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:CategoryList ID="CategoryList1" runat="server" />"

When I cut and paste that markup in SubMaster.master, I immediately
get an error displayed "Unrecognized 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:CategoryList'.")

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

I've got a MasterPage,master, as SubMaster.master, and a
DesignTime.master, 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.ascx, which incorporates
a drop downlist, a GridView, and a DataSource.

I can drag that UserControl on to my DesignTime.master 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.master (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:CategoryList ID="CategoryList1" runat="server" />"

When I cut and paste that markup in SubMaster.master, I immediately
get an error displayed "Unrecognized 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:CategoryList'.")

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
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...
5
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...
2
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,...
20
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...
3
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...
2
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. ...
2
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...
2
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...
1
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.