How to take control of style sheets in ASP.NET Themes with the StylePlaceHolder and Style control

纵然是瞬间 提交于 2019-11-30 00:45:55

Found the answer to my own question.

The reason for the rendering errors I am getting in design mode, is an apparent bug in Visual Studio SP1, which Microsoft has yet to fix.

So the above code works as expected, also in design mode, as long as you just include the custom controls in a pre compiled assembly, and not through another project in the same solution.

See the link above for a more detailed explanation of how and why.

Works very smoothly.

For those like me that never remember syntax of <% tags here's what you need to add to the top of the master page definition and the skin file to register the namespace.

<%@ Register TagPrefix="ass" Namespace="Assimilated.WebControls.Stylesheet" %>

I'm not sure I want that much 'ass' all over my code, but otherwise I like it.

Oh and if this is really your first custom control great job. I know it was inspired by someone else's code but it at least appears to have all the right attributes and interfaces.

Re: using specific media CSS file, you can use the @media CSS statement, works fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!