title: Using server side method in an external JavaScript file
body: <p>In a c# aspx project.
  I can reach a static method on client side with importing my namespace at the beginning part of the page, as follows.</p>
  
  <pre><code>&lt;%@ Import Namespace="utl=portal.library.Utilities" %&gt;
  </code></pre>
  
  <p>And than in can use that on client side of the same asxp page like.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var categoryPage;
  categoryPage = '&lt;%= utl.getcategoryName().ToString() %&gt;';
  &lt;/script&gt;
  </code></pre>
  
  <p>My question is, can i use that '&lt;%= utl.getcategoryName().ToString() %>' in an external javascript file ?</p>
  
  <p>Is it possible something like that ?</p>
  
  <pre><code>&lt;%@ Import Namespace="utl=portal.library.Utilities" %&gt;
  &lt;script src="/scripts/trial.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and in the trial.js file</p>
  
  <pre><code>var categoryPage;
  categoryPage = '&lt;%= utl.getcategoryName().ToString() %&gt;';
  </code></pre>
  
  <p>thanks in advance..</p>