Results 1 to 3 of 3
Aug 20, 2010, 11:22 #1
Accessing asp:HyperLinkField Text Property On RowDataBind
I'm hoping I can get some help to a problem I'm having. I'm trying to access the Data text Field value of a HyperLinkField inside of a GridView Control during the databind event. Normally, I could access any cell's value with some syntax along the lines the following in the RowDataBind function:
myVarText = e.Row.Cells(2).Text
But this doesn't work when trying to access the value of the hyperlinkfield. All that's returned is an empty string. If somebody could help point me in the right direction, I would appreciate it.
Aug 21, 2010, 15:32 #2
- Join Date
- Oct 2009
- Racoon City
- 1 Post(s)
- 0 Thread(s)
HyperLink hlink = (HyperLink)e.Row.FindControl("hyperlink1").Text
Aug 26, 2010, 04:42 #3
This worked out for me.