title: How to tell whether a variable in ASP has been declared
body: <p>Let me start off by saying I'm a PHP developer, not an ASP one. (And I really wish ASP had <code>isset()</code>.)  And I'm working in a live environment so I don't really have an opportunity to do any testing.</p>
  
  <p>All the resources I've found suggest different ways to test for the existence of a variable.</p>
  
  <p>Here's what I'm trying to do:</p>
  
  <p>On SOME pages, I set a variable which holds a value for a robots <code>&lt;meta&gt;</code> tag:</p>
  
  <pre><code>dim dsep_robots
  dsep_robots = "nofollow,noindex"
  </code></pre>
  
  <p>All pages include <code>header.asp</code>.  In my header file, I want to test whether <code>dsep_robots</code> has a value and if so, output that value, otherwise, output nothing.</p>
  
  <p><em>I think</em> that testing whether <code>dsep_robots</code> has a value might look like this:</p>
  
  <pre><code>if not dsep_robots = "" then
      '...
  end if
  </code></pre>
  
  <p>Best practices in PHP state that when you're using a variable that may or may not exist, you should always test <code>if (isset($var)) {...}</code> (not doing so will trigger a Notice if the variable doesn't exist).</p>
  
  <p>Is there such a thing in ASP -- i.e. do I really need to test if it exists, or can I simply test if it has a value?</p>