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

  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. 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. Mark Kamoski
    Replies:
    1
    Views:
    7,142
  2. Lloyd Sheen
    Replies:
    13
    Views:
    465
    Hermit Dave
    Jan 25, 2004
  3. TLOlczyk

    Grammer for crappy HTML.

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

Share This Page