Saturday, January 12, 2008

How do I use the ASP.NET Label correctly?

Here, I am just going to show tiny tip about ASP.NET Label control. Actually, it isn’t all about tip; just want to explain the way of using it correctly. As you all know we use ASP.NET Label control to present some dynamic or static text. But ASP.NET Label can do an extra task with its AssociatedControlID property.

FAQ00012_1

FAQ00012_2

According to the above screen shot, we have one ASP.NET Label and ASP.NET TextBox. ASP.NET Label is doing its job by showing the text. But what do you say if you can set focus the cursor on TextBox when you click on the Label. Yah, you can do it easily with AssociatedControlID.

FAQ00012_3

Labels:

0 Comments:

Post a Comment

<< Home