Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

FormView FindControl issue

 
 
Bryce
Guest
Posts: n/a
 
      08-19-2007
ASP.net 2.0, using Visual Studio 2005

Can't seem to figure out how to get a reference to a control in a FormView.

I have tried the following code:
Control list = ArticleDetailView.FindControl("IssueYearDropDown") ;

during several event handlers, including FormLoad,
ArticleDetailView_DataBinding, ArticleDetailView_ModeChanged
(ArticleDetailView is the FormView). It always returns null.

The Control is a DropDownList, and is specified in the InsertItemTemplate.

Thanks

 
Reply With Quote
 
 
 
 
Bryce
Guest
Posts: n/a
 
      08-19-2007
To answer my own question, I just searched for the control in the handler
that brought up the InsertItemTemplate, and it found it there..

Still trying to wrap my head around this stuff...

"Bryce" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ASP.net 2.0, using Visual Studio 2005
>
> Can't seem to figure out how to get a reference to a control in a
> FormView.
>
> I have tried the following code:
> Control list = ArticleDetailView.FindControl("IssueYearDropDown") ;
>
> during several event handlers, including FormLoad,
> ArticleDetailView_DataBinding, ArticleDetailView_ModeChanged
> (ArticleDetailView is the FormView). It always returns null.
>
> The Control is a DropDownList, and is specified in the InsertItemTemplate.
>
> Thanks


 
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 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
FindControl in FormView Zarn Bou via DotNetMonster.com ASP .Net 0 03-16-2005 12:06 AM



Advertisments