Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Barry 99 posts 187 karma points
    Oct 09, 2009 @ 14:53

    .NET Controls and IDs

    I get horribly long random IDs created when umbraco renders the .NET control - how can I change this?

    I am using CSS based on ID and so the control isnt rendering properly...

    The workaround I guess is to use CSS classes instead?

  • Tim Geyssens 6501 posts 15241 karma points MVP 2x c-trib
    Oct 09, 2009 @ 14:58
    Tim Geyssens

    Yes use css classes or add your css on the page and so you use <%= mycontrolid.ClientID %>

  • Barry 99 posts 187 karma points
    Oct 09, 2009 @ 15:08

    Can you please explain the <%= mycontrolid.ClientID %> option?

  • Rich Green 2246 posts 3971 karma points
    Oct 09, 2009 @ 15:32
    Rich Green

    This is standard .NET.

    There is an internal .NET reference for each control (the auto-generated one) and there is a 'clientID' which is the one in the DOM, hence this is the one to used when referencing via Javascript or CSS.

Please Sign in or register to post replies

Write your reply to: