hyperlinkfield text property returning null
I've a gridview which has Hyperlinkfield in Second Column, I'm trying to access the text property, but its returning null
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e) {
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index];
if (e.CommandName == "AddtoCart")
{
Response.Write(selectedRow.Cells[1].Text.ToString());//for testing of text value.
}
}
if i'm change it to a Boundfield, it will not return a null but with the bounded data, but i need the hyperlinkfield to exist, how do i solve this?