开发者

Reuse CSS from the Ajax Control Toolkit controls

I'm developping an ASP.NET 4.0 application with several controls from the Ajax Toolkit Control.

I need a tooltip component, so I use the HoverMenu (displays a Panel when hovering something) and I really like the design used by the ValidatorCallout.

So I copied the HTML generated by the framework开发者_StackOverflow and added that to my panel.

The problem is that it seems that the Ajax Toolkit controls dynamically load the CSS part they need. So it doesn't display anything as there are no ValidatorCallout on the page.

I would be really annoyed if I had to add that control only to get the CSS.

My solution so far is to also copy the CSS from the ASP.NET website, but I'm looking for a nicer way to reuse the existing Toolkit CSS.

Is there a way to load the parts I want "manually" ?


Yes, there is. Download the source code for the Toolkit, grab the CSS from the ValidatorCallout control and place it in the HoverMenu control. Adjust the style for the HoverMenu and recompile the Toolkit. I have done this myself and prefer it to wrestling with making my own CSS and trying to override the embedded styling of the toolkit controls.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜