Not sure if this is possible or not, but here's my scenario:
In about 10 of our aspx files we have the same javaScript function, I want remove this from all these pages and put it in the main javaScript file (main.js) which is global to all pages, so it's easier to maintain. the javaScript code in the current aspx pages looks something like this:
var regEx_gaid = <%= regEx["regEx_gaid"] %>;
var regEx_wCard = <%= regEx["regEx_wildCard"] %>;
var regEx_fCss = <%= regEx["regEx_flattenCss"] %>;
var regEx_iCss = <%= regEx["regEx_inlineCss"] %>;
...
function doSomething() {
// do something with those variables declared above.
}
Not sure how to get the server side values for those variables in main.js.
also this may also be relevant:
"regEx" inside <%= regEx["regEx_gaid"] %> is a dictionary collection on the server side and "regEx_gain" is key to access the value of the regEx dictionary.
Thanks.