Having problems with namespaces

Discussion in 'ASP .Net' started by clintonG, Apr 2, 2008.

  1. clintonG

    clintonG Guest

    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
     
    clintonG, Apr 2, 2008
    #1
    1. Advertising

  2. 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!B036196EAF9B34A8!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:%...
    > 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
     
    Cowboy \(Gregory A. Beamer\), Apr 2, 2008
    #2
    1. Advertising

  3. 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:%...
    > 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
     
    George Ter-Saakov, Apr 2, 2008
    #3
  4. 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:...
    > 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!B036196EAF9B34A8!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:%...
    >> 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

    >
    >
     
    Juan T. Llibre, Apr 2, 2008
    #4
  5. clintonG

    clintonG Guest

    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:...
    > 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:...
    >> 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!B036196EAF9B34A8!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:%...
    >>> 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

    >>
    >>

    >
    >
    >
     
    clintonG, Apr 2, 2008
    #5
  6. clintonG

    clintonG Guest

    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:%...
    > 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:%...
    >> 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

    >
    >
     
    clintonG, Apr 2, 2008
    #6
  7. You are welcome....
    been there myself :)

    George.



    "clintonG" <> wrote in message
    news:...
    > 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:%...
    >> 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:%...
    >>> 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

    >>
    >>

    >
     
    George Ter-Saakov, Apr 3, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rod
    Replies:
    1
    Views:
    414
    Bernard
    Sep 10, 2003
  2. Steve

    Still having postback problems

    Steve, Jan 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    341
    Steve
    Jan 11, 2004
  3. Pablo
    Replies:
    1
    Views:
    417
    Joris Gillis
    Jan 28, 2005
  4. Replies:
    1
    Views:
    508
    Romin
    Apr 20, 2005
  5. George Economos
    Replies:
    4
    Views:
    366
    Victor Bazarov
    Aug 23, 2005
Loading...

Share This Page