PC Review


Reply
Thread Tools Rate Thread

Defining FindControl Once Per Page

 
 
MRW
Guest
Posts: n/a
 
      21st Aug 2006
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!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
page.findcontrol jvcoach23 Microsoft ASP .NET 0 21st Apr 2009 02:44 PM
page.findcontrol jvcoach23 Microsoft ASP .NET 1 20th Apr 2009 02:15 PM
Page.FindControl Rob Meade Microsoft ASP .NET 4 14th Aug 2007 09:03 AM
Page.FindControl not working tshad Microsoft VB .NET 0 16th Aug 2006 03:02 AM
page.findcontrol sri_san@mailcity.com Microsoft ASP .NET 2 14th Jan 2005 03:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:03 PM.