Problem with LinkButton and AddAttributesToRender

Discussion in 'ASP .Net Building Controls' started by Henri, Oct 3, 2004.

  1. Henri

    Henri Guest

    Hi,

    I'm trying to design a custom LinkButton.
    It inherits LinkButton as I need the implementation of the Click event (and
    I don't know how to rewrite it).
    I have to use AddAttributesToRender to render all the style attributes and
    properties.
    But as I want to specifie my own href attribute, I can't use LinkButton's
    default AddAttributesToRender as it automatically adds its own href
    attribute.
    It would be great if I could call only WebControl's AddAttributesToRender
    (LinkButton's parent class) but it doesn't seem possible to call it from my
    class as it inherits LinkButton.
    So do I need to rewrite completely WebControl's AddAttributesToRender
    implementation to get rid of the href attribute added by LinkButton?
    Do you have any solution?
    Thanks

    Henri
     
    Henri, Oct 3, 2004
    #1
    1. Advertisements

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. Mike

    LinkButton Problem

    Mike, Feb 27, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    724
  2. Rob Meade

    LinkButton / doPostBack problem

    Rob Meade, Aug 25, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,309
    Raterus
    Aug 25, 2004
  3. Henri
    Replies:
    2
    Views:
    863
    Henri
    Oct 5, 2004
  4. Sathyaish
    Replies:
    3
    Views:
    3,352
    Sathyaish
    Sep 8, 2005
  5. Fueled
    Replies:
    4
    Views:
    5,919
    Fueled
    Nov 10, 2005
  6. Paul L

    Custom CheckBox class not calling AddAttributesToRender

    Paul L, Mar 17, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    242
    Paul L
    Mar 17, 2005
  7. TS

    checkboxlist "AddAttributesToRender"

    TS, Feb 16, 2009, in forum: ASP .Net Building Controls
    Replies:
    6
    Views:
    1,690
  8. Sathyaish

    Linkbutton does not look like a linkbutton

    Sathyaish, Sep 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    338
    Sathyaish
    Sep 8, 2005
Loading...