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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.