Peter
Peter

Reputation: 38495

WebUserControl css visual studio

Well fast question is there any way to use a css class in a web user control?

why?

well i have some classes in css that change the layout dramatically so if i want to view the result of the changes i dont want to press f5 and se the page load....

ps im using visual stuido 2008

Upvotes: 0

Views: 318

Answers (3)

Christian80
Christian80

Reputation: 459

You want to set the css directly to the usercontrol? Don't think that is a common way to do it, but if anyone else knows more about it...

But you will see the changes on the page which holds the usercontrol if the page has the particular css set in the head section. The changes will automatically be shown on the page.

Hope that helps you Petoj! ;)

Upvotes: 1

Emma Middlebrook
Emma Middlebrook

Reputation: 876

You can see changes to your css whilst debugging. Just load up your application, edit the css file and then press ctrl f5 to reload the css in you running web app. Only changes to the code need to be recompiled and relaunched.

Upvotes: 0

darasd
darasd

Reputation: 2977

yes. just add class attributes to the html elements in your user control or place a div around the whole of the control and give that div a class. it depends how much control over the styling that you need.

Upvotes: 0

Related Questions