Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have created composite custom server control. But I don't know how to include css file in this project file and apply classes belongs to this file to child controls in the composite custom server control.
Please help me for this. With example.
Posted

1 solution

The question does not really make sense. CSS is applied to any HTML elements. So, it can be applied to any controls, or not control, any elements. And there is no such HTML element as "composite custom user control". As you tag is "C# 4.0", it probably means that you are using ASP.NET in one or another form, and it simply means that your code renders some HTML, and your "composite custom user control" is translated in HTTP response as some HTML. Look at this HTML and see what's there. And apply CSS to whatever you want.

If something is unclear here, it would mean that you would need start learning what Web does, pretty much from scratch, but anyway, your follow-up questions will be welcome.

See also:
https://msdn.microsoft.com/en-us/library/h4kete56.aspx[^],
http://www.wiseowl.co.uk/blog/s253/css-style-sheets.htm[^],
http://www.aspnettutorials.com/tutorials/themes/usingcss-csharp[^].

—SA
 
Share this answer
 
Comments
Veeshal Mali 24-Jul-15 0:53am    
I know how to apply css for server controls.
I want to include CSS file in Server Control. Which we can create by choosing the project type as ASP.NET Server Control and we will create the dll file of this project and add it in tool box and use for any application.
Veeshal Mali 24-Jul-15 1:05am    
thank you sir...
This is what I had asked ...
Veeshal Mali 24-Jul-15 1:10am    
Sir please may i ask one another question related to this question ?
Sergey Alexandrovich Kryukov 24-Jul-15 1:15am    
You are very welcome. Of course your follow-up questions will be welcome. Start with the question in a comment, unless it has some code, then, if it is relevant to the original question, add the code there. If you rather need as separate question, I'll recommend to post it. Let's see.
—SA

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