pratikshahse
asked on
hyperlink column in my gridview
I have grid view in which I want the last column to be a hyperlink. and the querystring for that link is the going to be the value of the first column of the gridview. so the link should be something like
service.aspx?service="what ever the value is from the first column". the text of that hyperlink should be "View". How can I accomplish this?
I am populatating the grid by creating a datatable in my code and then binding the grid with that datatable.
service.aspx?service="what
I am populatating the grid by creating a datatable in my code and then binding the grid with that datatable.
<asp:BoundField DataField="servicename" HeaderText="Service" />
<asp:BoundField DataField="New" HeaderText="New" />
<asp:BoundField DataField="Old_Amount" HeaderText="Old Budget" />
<asp:BoundField DataField="New_Amount" HeaderText="New Budget" />
<asp:BoundField DataField="Difference" HeaderText="Difference" />
<asp:BoundField HeaderText="Notes/Attachments" />
<asp:HyperLinkField Text should be "View" url should be \service.aspx?servicename= value from the first column/>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://authors.aspalliance.com/aspxtreme/webforms/controls/addinghyperlinkfieldstogridview.aspx