title: vb.net If condition in aspx page
body: <p>I am trying to use vb.net If condition in grid view item template in aspx page. I tried below code but it was not working as expected.</p>
  
  <pre><code>&lt;ItemTemplate&gt;
   &lt;%If ddlstatus.SelectedValue.ToLower = "failed" Then%&gt;        
      &lt;asp:HyperLink  ID="hlfilepath" runat="server" Text='&lt;%# Bind("FILE_PATH")    NavigateUrl ='&lt;%# Bind("FILE_PATH") &gt;&lt;/asp:HyperLink&gt;
      &lt;% Else %&gt;
            &lt;asp:HyperLink  ID="filepath" runat="server" Text='&lt;%# Bind("FILE_PATH")&gt;&lt;/asp:HyperLink&gt;
      &lt;% End If%&gt;
   &lt;/ItemTemplate&gt;
  </code></pre>