User-667042492 posted
Hi everyone,
i have a custom control, and it has some embedded js,image and css files.. in an aspx page everything works
but in an ascx control, css and image files dont work, only js files works.. i register script with
RegisterClientScriptResource
mothod.. but i register css file like below;
1 string cssTemplate = "<link rel='stylesheet' text='text/css' href='{0}' />";
2 string cssRes = cs.GetWebResourceUrl(this.GetType(), resourceName);
3 LiteralControl css = new LiteralControl(String.Format(cssTemplate, cssRes));
4 this.Page.Header.Controls.Add(css);
i think usercontrol can not find css location..
Any suggestion ??
thanks..