Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FindControl - Find Hyperlink control in FooterTemplate? 1

Status
Not open for further replies.

russland

Programmer
Jan 9, 2003
315
CH
Hi,

I need to find the hyperlink control that I placed in the FooterTemplate of a gridview. I thought that's easy by just using myGridView.FindControl("myHyperlink")

Well, obviously it's not. What am I missing? Is the FooterTemplate a control of its own?

Thanks for any hint.
 
Code:
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
   If e.Row.RowType = DataControlRowType.Footer Then
      Dim hl As New HyperLink
      hl = e.Row.FindControl("Hyperlink1")
   End If
End Sub

JIm
 
just what i was looking for. thanks heaps champ.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top