title: How do I initialize a variable in a try-catch?
body: <p>I have a variable in a try-catch that isn't initializing.</p>
  
  <pre><code>try
  {
      var customcontroldata = svc.queryLookupsXml("customcontroldata");
  }
  catch
  {
      Response.Write(@"&lt;script&gt;alert('We laugh at you');window.location.replace('Accounts.aspx');&lt;/script&gt;");
      Response.End();
   }
  </code></pre>
  
  <p>I've tried to initialize the variable outside of the try-catch to no completion.  How would i get the customcontroldata variable to initialize in this method which also is used later in my code?</p>