David

David

  • NA
  • 2
  • 0

How do I access elements of an ItemTemplate in a DataGrid?

Oct 2 2006 3:11 PM
Hi, I am trying to access my HyperLink1 that is in the ItemTemplate of my DataGrid.  I am using VB.NET but it should be the same as C# i'm sure.

Here's what I'm trying to do:

HyperLink1.Attributes.Add("onclick", "window.open('popup.aspx',null,'height=250, width=250,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no ');")

I have a link with ID=HyperLink1 but i get a message "HyperLink1 is not declared".

What am I doing wrong?

Answers (2)