473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

crappy html

Seb
<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?
Jun 27 '08 #1
3 1000
"Seb" <se******************@gmail.comwrote in message
news:1e**********************************@k37g2000 hsf.googlegroups.com...
<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="">
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #2
Seb
On Jun 25, 12:32*am, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:
"Seb" <sebastianthegreat...@gmail.comwrote in message

news:1e**********************************@k37g2000 hsf.googlegroups.com...
<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" ...
Jun 27 '08 #3
Have you tried the AssociatedControlID attribute of the asp:label control?
It may generate some less crappy html ;-)

<asp:Label ID="Label6" runat="server" Text="Label"
AssociatedControlID="email"/>
<asp:TextBox ID="Email" runat="server" />
--
Support Fairtax Legislation
www.fairtax.org

"A government big enough to give you everything you want, is strong enough
to take everything you have."
-Thomas Jefferson

"Seb" <se******************@gmail.comwrote in message
news:1e**********************************@k37g2000 hsf.googlegroups.com...
<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?

Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties...
0
by: Boris Ammerlaan | last post by:
This notice is posted about every week. I'll endeavor to use the same subject line so that those of you who have seen it can kill-file the subject; additionally, Supersedes: headers are used to...
20
by: Al Moritz | last post by:
Hi all, I was always told that the conversion of Word files to HTML as done by Word itself sucks - you get a lot of unnecessary code that can influence the design on web browsers other than...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
13
by: Lloyd Sheen | last post by:
I am out of my mind fighting with the IDE HTML editor. Beyond the fact that reformatting the text is brain dead (and I am not just talking about the switching from design to HTML). I am putting...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
15
by: jim | last post by:
Hi All, I need to export a query to a text file but i need each field delimited by a new line. Cant seem to find a way to do it. any ideas.. thanks jim
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.