I am developing the asp.net mobile application. I am generating the controls dynamically at serverside (code behind), obviously i will need to assign the styles to con开发者_开发知识库trol on server side. So that I have my own CSS ie external CSS. I want to assign the classes from my CSS to mobile controls. How can i do this?
i am using asp.net mobile application development environment with code behind c#. please help. This is new for me.
I found the way on my question. see the code..:
<.mobile:DeviceSpecific ID="DeviceSpecific1" Runat="server">
<.Choice Filter="supportsJavaScript" Xmlns="http://schemas.microsoft.com /mobile/html32template">
<.ContentTemplate>
<.html>
<.link href="style.css" rel="stylesheet" type="text/css"/>
<./html>
<./ContentTemplate>
<./Choice> <./mobile:DeviceSpecific>
<./code>
and I had access this style sheet and applied. NOTE: Please remove the dots when using this code from tags.<. >
精彩评论