Why can't I override RenderBeginTag?

Discussion in 'ASP .Net Web Controls' started by Lisa, Sep 22, 2004.

  1. Lisa

    Lisa Guest

    I'm trying to make a custom control. I started off basing it on a
    ListBox, but because of the bug in that control that prevents it from
    rendering name/value pairs, I decided to use an HTMLSelect instead.

    But when I changed it, I started getting an error:

    Public Overrides Sub RenderBeginTag(ByVal writer As
    System.Web.UI.HtmlTextWriter)

    C:\Inetpub\wwwroot\BuildDir\UTILITIES\LLList\LLList.vb(39): 'Public
    Overrides Sub RenderBeginTag(writer As System.Web.UI.HtmlTextWriter)'
    cannot override 'Protected Overridable Sub RenderBeginTag(writer As
    System.Web.UI.HtmlTextWriter)' because they have different access
    levels.

    Can anyone explain what's up here? HTMLSelect does have a
    RenderBeginTag method, so why can't I override it? What are the
    access levels here?

    Thanks,
    Lisa
     
    Lisa, Sep 22, 2004
    #1
    1. Advertising

  2. "Lisa" <> wrote in message
    news:...
    > C:\Inetpub\wwwroot\BuildDir\UTILITIES\LLList\LLList.vb(39): 'Public
    > Overrides Sub RenderBeginTag(writer As System.Web.UI.HtmlTextWriter)'
    > cannot override 'Protected Overridable Sub RenderBeginTag(writer As
    > System.Web.UI.HtmlTextWriter)' because they have different access
    > levels.


    The error message tells you the exact problem. You are trying to override a
    "Protected" member with a "Public" one.

    John Saunders
     
    John Saunders, Sep 22, 2004
    #2
    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. Replies:
    3
    Views:
    557
    Steven Cheng[MSFT]
    Oct 9, 2006
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,974
    Smokey Grindel
    Dec 2, 2006
  3. shapper

    RenderBeginTag

    shapper, Dec 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,669
    shapper
    Dec 28, 2006
  4. Henri
    Replies:
    1
    Views:
    382
    Henri
    Jul 13, 2004
  5. Lisa

    Why can't I override RenderBeginTag?

    Lisa, Sep 22, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    154
    John Saunders
    Sep 22, 2004
Loading...

Share This Page