c# - Referencing embedded script from an embedded script -
i have 2 embedded resources in assemblyinfo.cs file.
[assembly: webresource("custom.inputbox.js", "text/javascript")] [assembly: webresource("custom.jquerycaret102min.js", "text/javascript")]
the first file works correctly, when tries reference second file error raised. have added resources in onprerender method:
string resourcename = "custom.inputbox.js"; clientscriptmanager clientscriptmanager = this.page.clientscript; clientscriptmanager.registerclientscriptresource(typeof(custom.inputbox), resourcename); resourcename = "custom.jquerycaret102min.js"; page.clientscript.registerclientscriptresource(typeof(custom.inputbox), resourcename);
the implementation in inputbox.js file:
if (typeof textbox.caret().start == "number" && typeof textbox.caret().end == "number") {//do something}
the files have been added "embedded resources. there may missing?
Comments
Post a Comment