I am a total newbie and I am trying to modify someone else's code.
The .aspx page has a gridview cotnrol on it. In the c# code behind, several columns for the gridview are defined, and rows are created ... all dynamically. That all works fine.
There is a column for "Email". I want the email to link to a page and pass an id that is unique to the email (which I know what it should be).
So the link would be, for example:
The column is defined in the code behind:
dcField = new DataColumn();
dcField.DataType = System.Type.GetType("System.String");
dcField.ColumnName = "Email";
dcField.ReadOnly = false;
dcField.Unique = false;
In the code behind, the column is filled ... I tried this but of course all I see in the grid view is the HTML, not a link:
string emailLink = "<a href=\"/mypage.aspx?id=" + formDataId.ToString() + "\">" + htFormData["Email"] + "</a>";
drRequest["Email"] = emailLink;
I know this is a common question on the web but I am such a newbie that I don't understand what is being said. I need to know exactly what code I need to add/change in the code behind so that the link will be displayed. I'm not looking for examples or links to other solutions. I need the exact code.
Please let me know if you need any other info.