Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

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))
0
Murray Brown
Asked:
Murray Brown
1 Solution
 
CodeCruiserCommented:
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now