Sbonga Mathobela

Sbonga Mathobela

  • NA
  • 68
  • 7.5k

How to make a grdview field value a link -Anchor link

Mar 28 2017 4:33 AM
Hi all.
 
DateTime dd = Convert.ToDateTime(site.Collection_Date);
dr["Collection Date"] = dd.ToShortDateString();
dr["Collection Time"] = site.Collection_Time;
dr["Collection Proof"] = "<a href=test.aspx>" + site.AttachImageReport + "</a>";
var st = db.tb_Status.FirstOrDefault(x => x.Status_Id == site.Vehicle_Status);
dr["Vehicle Status"] = st.Status;
 
I am using a gridview to display items like above. Now I can't make the field  dr["Collection Proof"] value to be a link.
 
Can you assist. 

Answers (4)