title: Dynamically generate hyperlink from 2 columns in GridView
body: <p>I hope I can explain this clearly:</p>
  
  <p>I have a GridView that only displays an ID and Name field from an EntityDataSource. </p>
  
  <p>I want to add a third column that will contain a dynamically generated hyperlink corresponding to each ID.</p>
  
  <p>However,the navigateurl for these hyperlinks can only be obtained by concatenating two other fields (that are not displayed) corresponding to the ID.</p>
  
  <p>Suppose my DataSource had the following data:</p>
  
  <pre><code>[ID] [Name] [Path] [FileName]
   1    ABC    path1  file1
   2    XYZ    path2  file2
  </code></pre>
  
  <p>I want to see the following gridview, with the hyperlink constructed as:</p>
  
  <pre><code>|ID | NAME | Hyperlink      |             
  ----------------------------|                
   1  | ABC  | path1/file1.pdf|
   2  | XYZ  | path2/file2.pdf|
  </code></pre>
  
  <p>How do I do construct a hyperlink from 2 columns?</p>
  
  <hr>
  
  <p>I'm doing an ASP.NET web form application, with the entity classes reverse engineered from the database. However, I added a read only property to a partial class. But I'm unable to access it. Here's what I added to my Entities class </p>
  
  <pre><code>public partial class MyEntity 
  { 
     public string FilePath 
     { 
        get { return string.Format("{0}/"{1}.pdf", this.FileName, this.FilePath); } 
     } 
  } 
  </code></pre>
  
  <p>Do I need to add any code elsewhere to access this read-only property? </p>