I hope I can explain this clearly:
I have a GridView that only displays an ID and Name field from an EntityDataSource.
I want to add a third column that will contain a dynamically generated hyperlink corresponding to each ID.
However,the navigateurl for these hyperlinks can only be obtained by concatenating two other fields (that are not displayed) corresponding to the ID.
Suppose my DataSource had the following data:
[ID] [Name] [Path] [FileName]
1 ABC path1 file1
2 XYZ path2 file2
I want to see the following gridview, with the hyperlink constructed as:
|ID | NAME | Hyperlink |
----------------------------|
1 | ABC | path1/file1.pdf|
2 | XYZ | path2/file2.pdf|
How do I do construct a hyperlink from 2 columns?
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
public partial class MyEntity
{
public string FilePath
{
get { return string.Format("{0}/"{1}.pdf", this.FileName, this.FilePath); }
}
}
Do I need to add any code elsewhere to access this read-only property?