Defining FindControl Once Per Page

M

MRW

Hello!

On one of my pages, I have many functions that are accessing a GridView
within a FormView. In all these functions, I have to state:

Dim GV_PhoneNumbers As GridView =
FV_Customer.Row.FindControl("GV_PhoneNumbers")

FV_Customer being the the FormView
GV_PhoneNumbers being the GridView

Is there a way I can define GV_PhoneNumbers only once in the page, so I
don't constantly have to redifine it? This also affects a function
that I have, where I wish to add "Handles GV_PhoneNumbers.DataBound",
however, since GV_PhoneNumbers hasn't been defined yet, it won't work.

Any help would greatly be appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top