Sub myGridView_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles SearchGrview.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim DetailBtn As ImageButton = CType(e.Row.FindControl("btnDetail"), ImageButton)
If Not IsNothing(DetailBtn) Then
Dim planId As String = e.Row.DataItem("Plancode").ToString()
Session("searchID") = planId
DetailBtn.Attributes.Add("Onclick", "javascript:window.open('Default2.aspx','_blank');")
End If
End If
End Sub
Tag : Ms SQL Server 2008, VBScript, Web (ASP.NET), VB.NET