title: Url in HyperLink Field being seperated by comma of the Link Description - SharePoint List
body: <p>I have a SP List with columns URL and Link Name. And I am binding it to the GridView.</p>
  
  <p>Below is my GridView</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" GridLines="None" ShowHeader="false"   AutoGenerateColumns="false"&gt;
    &lt;Columns&gt;
        &lt;asp:HyperLinkField DataTextField="LinkName" DataNavigateUrlFields="URL" Target="_blank"/&gt;
    &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>and on the code behind </p>
  
  <pre><code>  private void BindGridView(SPList list, string section, GridView grdView1)
      {
          SPQuery query = new SPQuery();
          query.Query = "&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=" + section + "/&gt;&lt;Value Type='Choice'&gt;" + section + "&lt;/Value&gt;&lt;/Eq&lt;/Where&gt;";
          query.ViewFieldsOnly = true;
          query.ViewFields = "&lt;FieldRef Name='URL'/&gt;" + "&lt;FieldRef Name='LinkName'/&gt;";
          SPListItemCollection listCollection = list.GetItems(query);
          if (listCollection != null &amp;&amp; listCollection.Count &gt; 0)
          {
              grdView1.DataSource = listCollection.GetDataTable();
              grdView1.DataBind();
          }
      }
  </code></pre>
  
  <p>Suppose I have the Link Name as Google and URL as www.google.com.</p>
  
  <p>When I click on the hyperlink field of the GridView, the URL in the brower is <strong>//goog.com,%20//goo.com</strong>, because of which it does not navigate to the URL.</p>
  
  <p>Someone please help me and let me know what am I doing wrong.</p>