After converting the Asp.net website to a web application, I get the message “MyNameSpace.MyMaster type not defined” on pages using the MasterType directive.
e.g. in aspx file
<%@ MasterType VirtualPath="~/MyMaster.master" %>
The following code is generated in the designer.vb file and has the error described above:
Public Shadows ReadOnly Property Master() As MyNameSpace.MyMaster
Get
Return CType(MyBase.Master, MyNameSpace.MyMaster)
End Get
End Property
If I remove the namespace, the error will disappear, but this code will be regenerated every time I make changes on the aspx page.
If I use TypeName without a namespace (for example, Typename = "MyMaster") instead of VirtualPath in the directive, the code is generated without a namespace reference and, therefore, without errors. However, this is not performed at run time. Enabling a namespace behaves the same as using VirtualPath.
, - , - .
, ?
UPDATE:
!
, . , .