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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -