We help IT Professionals succeed at work.

Listview and formview skins

pq2u
pq2u asked
on
Hi

 

I new to web development and have a Listview and a complicated Formview on my page. I have managed to work out the functionality of the controls to display the data. However I need to style the controls and make the styling editable externally. I have look at skins but can not find examples or tutorials of how to do this. All the examples and tutorials seem too basic. Please can you help point in the right direction to simple examples or tutorials to make Listviews and complicated Formviews controls and then style them.

 

A work college says do not bother with Skins just apply CSS to the control when it is rendered. Is this better then using Skins ?   If so should I even be bothering with ASP controls ?

PS I am using VS 2008

Cheers
      
Comment
Watch Question

Top Expert 2013
Commented:
ListView and FormView are like free-form. You can apply css styles to the controls as you wish.
I don't think you can apply styling to them in skins as you do with other controls like Lable,TB, etc.
But skins for Label/Tb etc control should get applied if those controls are inside other controls.

Author

Commented:
Thanks I think you cleared up the major issue. Please could to point my too some good examples etc
Top Expert 2013

Commented:
Here are examples using LV:
http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview-control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx
http://msdn.microsoft.com/en-us/library/bb398790.aspx

Note: The styling is applied to individual ul/li tags or table/tr/td tags.
If you have Label control inside LV, then you apply CssClass to that Label. If you have a skin for the Label Control in a Skin file, then you can apply that to this Label.

Author

Commented:
Thanks it really helped us