title: go to external site if it's an hyperlink
body: <p>I have a "view" link to an aspx page in a gridview for each row. </p>
  
  <p>Depending on the type of resource 1)File or 2)Hyperlink , it should either download the file or go to the hyperlink mentioned.</p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="View"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;a id="View" href="../resources/ResourceFile.aspx?Id=&lt;%# Eval("Id")%&gt;" target="_blank"&gt;View&lt;/a&gt;
                  &lt;/ItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>I got it working for the file type but how do I redirect to an external link like "www.yahoo.com" if it's an hyperlink.</p>
  
  <p>In the code behind </p>
  
  <pre><code>if(resource.ResourceType.ToLower().Equals("hyperlink")){
                      // what should i do here?
                 // the link is stored in resource.value
                  }
  </code></pre>
  
  <p>EDIT : Figured that the link should have an http:// prefix to work. Feeling stupid now :)</p>