Having problems with namespaces

Having problems with namespaces

am 02.04.2008 03:31:58 von Patrice

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

Re: Having problems with namespaces

am 02.04.2008 05:12:32 von NoSpamMgbworld

Not looking up anything, but I would find GetTypeHashCode and find out why
it is not overriding. I would also clear out any temporary ASP.NET files, as
that causes issues from time to time. Once cleared, it uis usually fine.

Here is my problem with Temporary ASP.NET files:
http://gregorybeamer.spaces.live.com/blog/cns!B036196EAF9B34 A8!510.entry

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
"clintonG" wrote in message
news:%23AWKFFGlIHA.4244@TK2MSFTNGP06.phx.gbl...
> 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

Re: Having problems with namespaces

am 02.04.2008 16:46:05 von 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.



"clintonG" wrote in message
news:%23AWKFFGlIHA.4244@TK2MSFTNGP06.phx.gbl...
> 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

Re: Having problems with namespaces

am 02.04.2008 16:53:33 von nomailreplies

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)));
}




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Cowboy (Gregory A. Beamer)" wrote in message
news:Ofu7o9GlIHA.3512@TK2MSFTNGP03.phx.gbl...
> Not looking up anything, but I would find GetTypeHashCode and find out why it is not overriding. I would also clear
> out any temporary ASP.NET files, as that causes issues from time to time. Once cleared, it uis usually fine.
>
> Here is my problem with Temporary ASP.NET files:
> http://gregorybeamer.spaces.live.com/blog/cns!B036196EAF9B34 A8!510.entry
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my blog
> http://gregorybeamer.spaces.live.com/lists/feed.rss
>
> or just read it:
> http://gregorybeamer.spaces.live.com/
>
> *************************************************
> | Think outside the box! |
> *************************************************
> "clintonG" wrote in message news:%23AWKFFGlIHA.4244@TK2MSFTNGP06.phx.gbl...
>> 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
>
>

Re: Having problems with namespaces

am 02.04.2008 22:17:26 von Patrice

GetTypeHashCode Documentation says this:
http://msdn2.microsoft.com/en-us/library/system.web.ui.page. gettypehashcode.aspx

I deleted temporary files which did not resolve the problem but the problem
has been resolved; I forgot to edit inheritence via the .aspx.


"Juan T. Llibre" wrote in message
news:ubDPUFNlIHA.748@TK2MSFTNGP04.phx.gbl...
> 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)));
> }
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ======================================
> "Cowboy (Gregory A. Beamer)" wrote in
> message
> news:Ofu7o9GlIHA.3512@TK2MSFTNGP03.phx.gbl...
>> Not looking up anything, but I would find GetTypeHashCode and find out
>> why it is not overriding. I would also clear
>> out any temporary ASP.NET files, as that causes issues from time to time.
>> Once cleared, it uis usually fine.
>>
>> Here is my problem with Temporary ASP.NET files:
>> http://gregorybeamer.spaces.live.com/blog/cns!B036196EAF9B34 A8!510.entry
>>
>> --
>> Gregory A. Beamer
>> MVP, MCP: +I, SE, SD, DBA
>>
>> Subscribe to my blog
>> http://gregorybeamer.spaces.live.com/lists/feed.rss
>>
>> or just read it:
>> http://gregorybeamer.spaces.live.com/
>>
>> *************************************************
>> | Think outside the box! |
>> *************************************************
>> "clintonG" wrote in message
>> news:%23AWKFFGlIHA.4244@TK2MSFTNGP06.phx.gbl...
>>> 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
>>
>>
>
>
>

Re: Having problems with namespaces

am 02.04.2008 22:19:28 von Patrice

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


"George Ter-Saakov" wrote in message
news:%236u3IBNlIHA.5080@TK2MSFTNGP02.phx.gbl...
> Post here your <%@Page directive
>
> I think you inheriting there from class that does not exist...
>
> Must be something like
> Inherits="CompanyName._Defaul"
>
> George.
>
>
>
> "clintonG" wrote in message
> news:%23AWKFFGlIHA.4244@TK2MSFTNGP06.phx.gbl...
>> 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
>
>

Re: Having problems with namespaces

am 03.04.2008 15:08:56 von George Ter-Saakov

You are welcome....
been there myself :)

George.



"clintonG" wrote in message
news:et1Xd7PlIHA.1744@TK2MSFTNGP05.phx.gbl...
> 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
>
>
> "George Ter-Saakov" wrote in message
> news:%236u3IBNlIHA.5080@TK2MSFTNGP02.phx.gbl...
>> Post here your <%@Page directive
>>
>> I think you inheriting there from class that does not exist...
>>
>> Must be something like
>> Inherits="CompanyName._Defaul"
>>
>> George.
>>
>>
>>
>> "clintonG" wrote in message
>> news:%23AWKFFGlIHA.4244@TK2MSFTNGP06.phx.gbl...
>>> 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
>>
>>
>