Click here to Skip to main content
15,886,637 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to add an External css file in ascx file (User control)?
Posted

1 solution

CSS is associated to the page, and not the control specifically. But you can use the CSS in the control when the page has referenced it.

You can reference the css file in the header of the page containing the user control.

hope it helps :)
 
Share this answer
 
Comments
bbirajdar 4-Feb-13 4:46am    
Uday is right.. CSS should be associated with Page and not the user control. Otherwise the CSS path will break when you place the UserControl on different paths.
RavitejaPammi 4-Feb-13 7:36am    
Hai Uday Thanks for your valuable reply... your solution is found true. I have another problem with my ascx page. In Asp Button "onClick" event is not working in IE6. It works fine on FF 18.0/Chrome. I tried so many ways but i can't find solution yet... I used in .vb file like

btn.Attributes.Add("onclick", "__noPostBack('FinancialLedger.aspx');")

In IE6 it shows JavaScript error : "Object is required". What is the Solution?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900