Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: Wrong css resource loaded when use inherit class of some ajax control [27821]

$
0
0
Hi,

I need to custom ComboBox control, so i create a class that inherit this control. But i can't use this class because the css resource is loaded is not correct.
Seem that ajaxToolkit use GetWebResourceUrl(control.GetType() ...) that return wrong resource if control.GetType() return wrong project type.

I have work around by adding a ComboBox control to my Controls then remove it.
Do you have any idea to get correct css resource for inherit class of some ajax toolkit control

Thanks
Comments: In the current release of ASP.NET AJAX Control Toolkit, a specific pattern should be followed to name css files. In your case, it will look like this:   [ClientCssResource("MyProject.MyStylesheet")] and [assembly: WebResource("AjaxControlToolkit.Styles.MyProject.MyStylesheet.css", "text/css", PerformSubstitution = true)]   Please note that the ClientCssResource attribute value does not have the ".css" suffix, while the WebResource attribute value has the "AjaxControlToolkit.Styles." prefix and the ".css" suffix. Also, check to see that the logical name of the css file embedded into your assembly equals the WebResource attribute value. You can use the [ILSpy](http://ilspy.net/) decompiler to complete this task.  

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>