I have a GridView that has multiple columns. Let’s say I have a business modell that looks like this:
public class MyObject
{
public String Title {get;set;}
public DateTime Date {get;set;}
public String NavigateUrl {get;set;}
}
My grid has two visible columns (Title and Date).
What I want to do, is to make each row clickable and to act like a link, that is going to the specified NavigateUrl.
No problem so far.
I could use the OnRowDataBound-Event to assign a Javascript that tells the Grid that I performed a Select and in the OnRowEvent, I could perform a Response.Redirect.
But that is not what I want to do, because it is not SEO friendly.
How can I make the whole “grid row as link” idea SEO friendly?
Edit: Adding an extra, visible column is no option
Provide a link as a column in the grid, and make the tr’s onclick event fire off the link.