Get text of ASP.NET HyperLinkField in GridView

前端 未结 3 601
北恋
北恋 2020-12-20 20:06

I\'m trying to get the text of a HyperLinkField in a GridView\'s OnRowDelete event (the HyperLinkField\'s text is the primary key of the row I wish to delete). I understand

3条回答
  •  误落风尘
    2020-12-20 20:30

    Another alternative method of getting the text value of a hyperlink:

    Server.HtmlDecode((teamGridView.Rows[e.RowIndex].Cells[0].Controls[0] as HyperLink).Text)
    

提交回复
热议问题