Search code examples
asp.netcssuser-controlsapp-themes

I have a CSS file in my App_Themes folder - how can I apply it to my web user control?


Any help? I can't seem to figure it out.


Solution

  • I am not sure if I understand you question correctly (as often if the title of the question is longer than the text...). But if you are trying to apply a skin to a custom control the following links might help.

    Themes for Custom Controls in ASP.NET and ASP.NET 2.0 Themes and Custom Controls.

    It comes down to have a <%@ Register TagPrefix=... directive in your skin file.

    Regular CSS files are not "applied by you", I would say. The browser "just applies them". So if your control outputs HTML that references a style that exists in you CSS you are OK (check the source of the rendered page maybe?).