"But in .js file it does not resolve the <%%> value. Any help would be appreciated. "
As it shouldn't.... you've got a .js file, which IIS treats as plain ol text and passes through untouched, it will never get seen or more importantly processed by ASP.NET You've got options through: 1) Keep any dynamically created script in the asp or aspx page 2) create a new aspx page thats got all the JS markup inside it set it's ContentType to "text/javascript" But either way, the whole point of external js is so that the browser will cache it so it only needs to be downloaded once, so having changing values in a static js file doesn't make much sense anyways