0

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#

4
  • 1
    What is the rendered HTML? And what is your corresponding stylesheet? Commented Dec 6, 2012 at 18:27
  • I am using visual studio 2010 , asp.net using c# Commented Dec 6, 2012 at 18:28
  • I would not use spaces between attributes for one. Could be a syntax issue. Commented Dec 6, 2012 at 18:30
  • By intellisense style attribute should come right? Commented Dec 6, 2012 at 18:31

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.