开发者

ASP.NET Multiple themes for GridView

I have an ASP.NET application inside which i have a GridView.I have Skin file and CSS for the GRidView Present inside the App_Theme folder.Now i want the user to switch the style(Colors a开发者_运维知识库nd Font) for the Grid view based on user preference.Is there any way i can associate a purticular Theme folder to a Grid.Can i keep the CSS file other than the App_Theme Folder ?


Themes work at the theme level; you can switch themes by assigning the theme property of the page in the PreInit event...

Check this out: http://msdn.microsoft.com/en-us/library/tx35bd89.aspx

Alternatively, you could create multiple themes for a GridView control, and give it a SkinID within the ASP.NET theme. Then, you can change the SkinID for the GridView to the theme you want to apply. This would be for skins only, CSS doesn't work this way.

HTH.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜