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: Hi, I will post 2 cases that relate load css resource wrongly Case1 public class MyClass : ComboBox { //do smt } >> loaded wrong css resource because GetWebResourceUrl with a wrong controlType Case2 [assembly: WebResource("MyProject.MyStylesheet.css", "text/css", PerformSubstitution = true)] namespace MyProject { [ClientCssResource("MyProject.MyStylesheet.css")] public class MyExtender : ExtenderControlBase { //do smt} } This case also load wrong css resource (MyProject.MyStylesheet.css) because GetWebResourceUrl with a wrong resourceName. it has been changed by FormatStyleResourceName(name, minified) You can check it in function GetStyleHref(string name, Control control) Please check it. Thanks.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



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