Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

VS2012 designer web project classes/namespace issue

$
0
0

Hi All: I created a web project "myProject" with a master page "admin.master" and webpage "inventory.aspx". I've set some public properties on the master page and am accessing them on the webpage using the "MasterType" declaration:

<%@ Page Title="Inventory" Language="vb" AutoEventWireup="false" MasterPageFile="~/admin/admin.Master" CodeBehind="inventory.aspx.vb" Inherits="inventory"  %><%@ MasterType VirtualPath="~/admin/admin.Master" %>

Every time I debug or rebuild the project, VS2012 inserts this into inventory.aspx.designer.vb:

   Public Shadows ReadOnly Property Master() As myProject.admin
        Get
            Return CType(MyBase.Master, myProject.admin)
        End Get
    End Property

But the error list shows:

Type 'myProject.admin' is not defined.

And the suggested correction is to replace "myProject.admin" with "admin". When I remove "myProject" the project works properly, but each time the project is rebuilt, "myProject.admin" is re-inserted into the designer.

What am I missing from my project settings or code to prevent the designer from being updated this way?

I ran into the same problem when i tried to use "typename" instead of "virtualpath" for the "MasterType" declaration.




Viewing all articles
Browse latest Browse all 3509

Trending Articles