Having problems with namespaces

C

clintonG

namespace CompanyName
{
public partial class ...
{
...
}
}

Keeps failing when trying to use a namespace on a new web site. I've tried
with page classes that inherit from System.Web.UI.Page, my own
CommonBaseClass : System.Web.UI.Page, pages that inherit the CommonBaseClass
and when using a MasterPage. I just keep getting the same error...

// no idea what this implies...
Compiler Error Message:
CS0115: 'ASP.default_aspx.GetTypeHashCode()':
no suitable method found to override
 
G

George Ter-Saakov

Post here your <%@Page directive

I think you inheriting there from class that does not exist...

Must be something like
Inherits="CompanyName._Defaul"

George.
 
J

Juan T. Llibre

re:
I would find GetTypeHashCode and find out why it is not overriding

It's a page compiler method :

private void BuildGetTypeHashCodeMethod();
Declaring Type: System.Web.Compilation.PageCompiler

private void BuildGetTypeHashCodeMethod()
{
CodeMemberMethod method = new CodeMemberMethod();
method.Name = "GetTypeHashCode";
method.ReturnType = new CodeTypeReference(typeof(int));
method.Attributes &= ~MemberAttributes.AccessMask;
method.Attributes &= ~MemberAttributes.ScopeMask;
method.Attributes |= MemberAttributes.Public | MemberAttributes.Override;
base._sourceDataClass.Members.Add(method);
method.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(this.Parser.TypeHashCode)));
}
 
C

clintonG

You da man George. Thank you for reminding us we have to edit the .aspx on
..cs files we add the namespace to manually.

<%= Clinton
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top