ASP.net VB.net referring to dynamically created GridViews

Hi

How do I refer to a GridView that has an ID created dynamically  using code like the following

   Dim oGridView As New GridView
        oGridView.ID = "xChartGridView" & Cstr(oCounter)

Something like:
Dim G as GridView = Controls(xChartGridView" & Cstr(oCounter))
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
CodeCruiserConnect With a Mentor Commented:
You can use FindControl method as well as the technique I mentioned in other thread of maintaining a List(of GridView) variable in session.
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.