1
如何將一個屬性(如rel =「example_group」)添加到數據綁定網格視圖中的超鏈接控件?如何將屬性添加到GridView中的超鏈接
<asp:HyperLink ID="HyperLink3" runat="server">HyperLink</asp:HyperLink>
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
Dim myImage As HyperLink = CType(e.Row.FindControl("HyperLink3"), HyperLink)
myImage.Attributes.Add("rel", "example_group")
End Sub
沒有工作。 thx爲所有提前響應...