title: ASP.NET - Link in GridView
body: <p>I created page with GridView, but I need to make links in 1 column, if I try to put <code>&lt;a&gt;</code> tag it doesn't work, it just shows plain html <code>&lt;a&gt;</code> tag.</p>
  
  <p>I need at first row link to otherpage.aspx?id=1, second row otherpage.aspx?id=2 and so on.</p>
  
  <p>Grid.aspx</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" CellPadding="4"
    ForeColor="#333333" GridLines="None" PageSize="5" ViewStateMode="Enabled"
    Width="100%" OnSelectedIndexChanged="GridView1_SelectedIndexChanged1"&gt;
  
      &lt;AlternatingRowStyle BackColor="White" /&gt;
  
      &lt;Columns&gt;
      &lt;/Columns&gt;
  
  
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Grid.aspx.cs</p>
  
  <pre><code>DataTable data = new DataTable();
  
  data.Columns.Add("New column");
  // others columns
  
  
  for (int i = 1;i &lt; 10; i++)
  {
      data.Rows.Add();
      data.Rows[i]["New column"] = "&lt;a href='otherpage.aspx?id='"+ i +"&gt;Link&lt;/a&gt;";
      // other columns
  }
  
  GridView1.DataSource = data;
  GridView1.DataBind();
  </code></pre>
  
  <p>Or is any better solution to create links in GridView (programmatically)?</p>