|
|
|
start date: Sun, 19 Aug 2007 17:01:31 -0400,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
Bryce
|
|
2
Bryce
|
FormView FindControl issue
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
Date:Sun, 19 Aug 2007 17:01:31 -0400
Author:
|
Re: FormView FindControl issue
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" wrote in message
news:ADEB2C1D-079F-4BEA-9EDA-23ECC5683E9A@microsoft.com...
> 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
Date:Sun, 19 Aug 2007 17:25:40 -0400
Author:
|
|
|