Wednesday, 22 February 2012

.Net Beginners : How to write Text for the asp:Label control?

For write text in asp:Label , set .Text Property of Label.

From HTML View you can set like following way.
<asp:Label ID="lblProductName" runat="server" Text="TV"></asp:Label>

From Code Behind you can set like following way.
i.e : Label Id :- lblProductName
 vb.net code :  lblProductName.Text="TV"
 c#.net code :   lblProductName.Text="TV";

No comments:

Post a Comment