RenderBeginTag

Discussion in 'ASP .Net' started by shapper, Dec 28, 2006.

  1. shapper

    shapper Guest

    Hi,

    I am creating a custom control and I am changing the begin tag from
    <span> to <div>:

    Public Overloads Overrides Sub RenderBeginTag(ByVal writer As
    HtmlTextWriter)

    writer.Write("<div>")

    End Sub

    The problem is I want the control properties to the <div> tag.

    For example, when I place the control in a web page:
    MyControl.Id = "myControl"
    MyControl.CssClass = "myControl"
    MyControl.BackColor = White

    I want those properties to be applied to the <div>. Like the div would
    be a panel.

    Any idea?

    Thanks,
    Miguel
     
    shapper, Dec 28, 2006
    #1
    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:
    577
    Steven Cheng[MSFT]
    Oct 9, 2006
  2. Henri
    Replies:
    1
    Views:
    416
    Henri
    Jul 13, 2004
  3. Lisa

    Why can't I override RenderBeginTag?

    Lisa, Sep 22, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    168
    John Saunders
    Sep 22, 2004
  4. Mark S

    Get RenderBeginTag HTML to show in Design Mode

    Mark S, Nov 16, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    129
    Mark S
    Nov 16, 2004
  5. xenomur

    renderbegintag without any tag

    xenomur, Feb 27, 2007, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    191
    xenomur
    Mar 1, 2007
Loading...

Share This Page