crappy html

Discussion in 'ASP .Net' started by Seb, Jun 24, 2008.

  1. Seb

    Seb Guest

    <label for="Email" onclick="">
    <asp:Label ID="Label6" runat="server" Text="Label" />
    <asp:TextBox ID="Email" runat="server" />
    </label>

    The generated id is far from email. Which cause the label tag not to
    function. Anyone know of a way so I can actually use the label tag?
     
    Seb, Jun 24, 2008
    #1
    1. Advertisements

  2. Seb

    Seb Guest

    On Jun 25, 12:32 am, "Mark Rae [MVP]" <> wrote:
    > "Seb" <> wrote in message
    >
    > news:...
    >
    > > <label for="Email" onclick="">
    > > <asp:Label ID="Label6" runat="server" Text="Label" />
    > > <asp:TextBox ID="Email" runat="server" />
    > > </label>

    >
    > > The generated id is far from email. Which cause the label tag not to
    > > function. Anyone know of a way so I can actually use the label tag?

    >
    > What happens if you do this...?
    >
    > <label for='<%=Email.ClientID%>' onclick="">
    >


    Thanks for the answer. Haven't tested it because I realized that the
    code below does the trick
    <asp:Label AssociatedControlID="Email" ...
     
    Seb, Jun 24, 2008
    #2
    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. Mark Kamoski
    Replies:
    1
    Views:
    7,350
  2. Mitchua
    Replies:
    1
    Views:
    7,353
    Ice Demon
    Jul 15, 2003
  3. Laura
    Replies:
    1
    Views:
    688
    Gunnar Hjalmarsson
    Jun 5, 2004
  4. Matthew Louden
    Replies:
    1
    Views:
    7,573
    Scott M.
    Oct 11, 2003
  5. Lloyd Sheen
    Replies:
    13
    Views:
    578
    Hermit Dave
    Jan 25, 2004
  6. TLOlczyk

    Grammer for crappy HTML.

    TLOlczyk, Jul 2, 2004, in forum: HTML
    Replies:
    4
    Views:
    584
    Whitecrest
    Jul 2, 2004
  7. boneless
    Replies:
    9
    Views:
    642
    =?UTF-8?b?TMSByrtpZSBUZWNoaWU=?=
    Sep 22, 2004
  8. Adam Akhtar
    Replies:
    9
    Views:
    834
    Florian Gilcher
    Aug 16, 2008
Loading...