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

Help Needed with Master Pages in ASP.NET 3.5

I have just started working with ASP.NET 3.5 and Visual Studio 2008
and I am having a problem. I am using a master page for my project
and I have set up two Public Properties on that page that need to be
set on each content page that is built based on it. I am using this
line of code in the content page so I can access the properties on the
master page:

<%@ MasterType VirtualPath="~/Registration.Master" %>

The error I keep getting whenever I make even the most trivial change
to the content page is in the .aspx.designer.vb file (for example,
Default.aspx.designer.vb). The code it generates looks like this:

'''<summary>
'''Master property.
'''</summary>
'''<remarks>
'''Auto-generated property.
'''</remarks>
Public Shadows ReadOnly Property Master() As
Registration.Registration
Get
Return CType(MyBase.Master, Registration.Registration)
End Get
End Property

The error is the Registration.Registration portion. The code should
read just Registration, not Registration.Registration. Once I change
the code back the page works correctly. Is there something I'm doing
wrong that is causing this error or is this a bug in Visual Studio?

Thanks,
Paul M. Frazier
pa**********@ecotoh.org
Jun 27 '08 #1
3 1824

<pm****@gmail.comwrote in message
news:7b**********************************@e39g2000 hsf.googlegroups.com...
>I have just started working with ASP.NET 3.5 and Visual Studio 2008
and I am having a problem. I am using a master page for my project
and I have set up two Public Properties on that page that need to be
set on each content page that is built based on it. I am using this
line of code in the content page so I can access the properties on the
master page:
ms.public.dotnet.framework.aspnet

Jun 27 '08 #2
Mr, Arnold,

In my idea is this a question about the language VB in dot Net.

Cor

"Mr. Arnold" <MR. Ar****@Arnold.comschreef in bericht
news:ep****************@TK2MSFTNGP05.phx.gbl...
>
<pm****@gmail.comwrote in message
news:7b**********************************@e39g2000 hsf.googlegroups.com...
>>I have just started working with ASP.NET 3.5 and Visual Studio 2008
and I am having a problem. I am using a master page for my project
and I have set up two Public Properties on that page that need to be
set on each content page that is built based on it. I am using this
line of code in the content page so I can access the properties on the
master page:

ms.public.dotnet.framework.aspnet
Jun 27 '08 #3
The purpose of the designer vb part is that you don't change it (and in a
way is the partial class created for that, so that it is seperated from the
rest of the code).

As you want to change code do it then in the partial class (in ASPNET mostly
called code behind) of your code.

Cor

<pm****@gmail.comschreef in bericht
news:7b**********************************@e39g2000 hsf.googlegroups.com...
>I have just started working with ASP.NET 3.5 and Visual Studio 2008
and I am having a problem. I am using a master page for my project
and I have set up two Public Properties on that page that need to be
set on each content page that is built based on it. I am using this
line of code in the content page so I can access the properties on the
master page:

<%@ MasterType VirtualPath="~/Registration.Master" %>

The error I keep getting whenever I make even the most trivial change
to the content page is in the .aspx.designer.vb file (for example,
Default.aspx.designer.vb). The code it generates looks like this:

'''<summary>
'''Master property.
'''</summary>
'''<remarks>
'''Auto-generated property.
'''</remarks>
Public Shadows ReadOnly Property Master() As
Registration.Registration
Get
Return CType(MyBase.Master, Registration.Registration)
End Get
End Property

The error is the Registration.Registration portion. The code should
read just Registration, not Registration.Registration. Once I change
the code back the page works correctly. Is there something I'm doing
wrong that is causing this error or is this a bug in Visual Studio?

Thanks,
Paul M. Frazier
pa**********@ecotoh.org
Jun 27 '08 #4

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

Similar topics

4
by: Kim Petersen | last post by:
I've worked on this table object a bit too long - and seem to have stared too long at the code. Can someone see where it goes wrong in the insertrow function? Also optimization hints and...
19
by: Thue Tuxen Sørensen | last post by:
Hi everybody ! I´m maintaining a large intranet (approx 10000 concurrent users) running on one IIS box and one DB box with sqlserver 2000. Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2...
5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
2
by: Jim | last post by:
OK....so I got a little off-topic last time....... I still want to do a simple web page like MSDN Library (http://msdn.microsoft.com/library/default.asp) with a couple of changes. On my...
4
by: Learner | last post by:
Hello, Here is a little bit of what I am working ... I have selected Header and Side lay out for my Master Page. All my links go on the Side and the content on to the right pane. I have no...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
11
by: simon | last post by:
Hello, I'm helping write a .net app, we are using VS2005 and asp/vb.net for code we are using the "masterPage.master" technique, within the masterpage we have an asp:contentplaceholder that is...
1
by: Von Shean | last post by:
I have a website that i have migrated VS 2003 to VS 2005. I have done some work like adding master pages and making rest of the pages as content pages. However, now i want the site to be...
3
by: Rich | last post by:
Hi, I want to use 2 master pages, one for the main part of the site, the other for the admin pages. They are quite similar, with many shared elements. Ideally I would like to have a parent...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.