Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > FindControl in FormView

Reply
Thread Tools

FindControl in FormView

 
 
Zarn Bou via DotNetMonster.com
Guest
Posts: n/a
 
      03-16-2005
Hi,
I am creating a site that uses a master/detail type structure, where I
am using the Gridview to display the master records, and when the user
selects one of these I display all the details for this record in a
FormView detail section.
Now I want to be able to enable and disable certain controls in the
FormView, e.g. a textbox depending on some of the properties for that
record.
I capture the selectedindexchange event for the gridview, and it's at this
time when I want to enable or disable the textbox. I use the
FormView.FindControl() method to try and instantiate the textbox that is in
the EditItemTemplate of the Formview, but it comes up as null.

The only time when I can instantiate the object is if I place a button in
the EditItemTemplate and capture the click event of the button, then I can
instantiate the textbox.
Is there a way to instantiate an object inside a Formview template without
having to be inside the template already?

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
FormView - FindControl Paul Aspinall ASP .Net 14 08-20-2011 07:02 AM
FindControl in FormView Edit Template SteveT ASP .Net 1 06-07-2007 06:47 PM
findcontrol in a formview Mr. SweatyFinger ASP .Net 0 12-01-2006 02:46 AM
Equating one formview to another ?? Dynamic type code? Findcontrol? jobs ASP .Net 0 11-07-2006 05:08 PM
Formview FindControl conversion to c# sck10 ASP .Net 2 08-28-2006 10:56 PM



Advertisments