Sohail
Sohail

Reputation: 780

How to use css in asp.net for web server control?

In asp.net using a web server control but in visual studio why style attribute is not coming for the below code

  <asp:Label ID = "UserLabel" runat = "server" CssClass = "LabelClass" AssociatedControlID = "UsernameTextBox" >Username</asp:Label>

By intellisense it should come right, but style attribute is not coming at all. I am using visual studio 2010 , asp.net using C#

Upvotes: 0

Views: 449

Answers (1)

Darren Wainwright
Darren Wainwright

Reputation: 30727

The Style property never shows on intellisense when using the asp server controls. The intellisense will show for the attributes after you type Style="

The server control inherits System.Web.UI.Control, which doesn't have style as a property.

However, it will be rendered out to the HTML.

Upvotes: 2

Related Questions