Accessing asp:HyperLinkField Text Property On RowDataBind

Hey All,

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.

Thanks!

B


HyperLink hlink = (HyperLink)e.Row.FindControl("hyperlink1").Text

Thanks USPatriot,

This worked out for me.