asp.net - Designer.cs file creates errors automatically -


I'm flawed as, I have received some unnecessary help in creating errors in Visual Studio 2008 as a .designer I appreciate this .cs file, maybe it is due to my default or error - but I will use this excuse that I am an ASP.NET developer in reality, so I am still learning.

Solution Explorer will look like this:

  / prototype / Project01.Master - Project01.Master.cs - Project01.Master.designer.cs /SampleApplication.aspx - SampleApplication .aspx.cs - SampleApplication Aspx.designer.cs  

I'm not completely sure which files are included to include in the question, so I'll try and guess that I can do as well Can i Both .Master.cs and SampleApplication.aspx.cs include themselves within the Project01.Prototypes namespace (although I am not precious about that, it is something that was added to the auto and worked and I think about it While not needed).

The following is the top of SampleApplication.aspx (In order to enable access to some properties, the master page is displayed in the theory.

   <% MasterType VirtualPath = "~ /Prototypes/Project01.Master"%>  

is within SampleApplication.aspx.designer.cs:

  named place Project01 .Prototypes {Public Partial Class SampleApplication {Public New Project01.Prototypes.Project01 Master {{Mill Return ((Project01.Pro Totypes.Project01) (base.Master))}}}}  

The result of which all results in error:

  type name 'prototype' type 'Project01.Prototypes.Project01' does not exist in  

I can fix this error and get back to work by getting rid of the 'Project 01. prototype.' , Reference in class only (excluding namespace). My problem is that this is only a temporary solution because Visual Studio connects it back by adding - so I think the question is where is my fault really?

If this is important, then I am running with ASP.NET MVC web application in Visual Studio 2008.

The problem is that your top-level namespace and your master page class have the same name . Therefore, when the compiler tries to solve this type, then he is looking for type "prototype.product 01" inside your master page class.

I recommend using the typename property on mastertype instructions instead of virtual path, but when you use an appropriate type of name there, the parser starts to throttle. As I see, you have two options:

  1. Rename your master page Using Project Name It seems that this could be the reason for confusion.
  2. Do not use MasterType Directive and manually declare master property in your codehead file.

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -