Help Needed with Master Pages in ASP.NET 3.5

P

pmfphd

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
(e-mail address removed)
 
M

Mr. Arnold

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
 
C

Cor Ligthert[MVP]

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
 
C

Cor Ligthert[MVP]

Mr, Arnold,

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

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top