Home All Groups Group Topic Archive Search About
Author
17 May 2006 3:43 PM
Islamegy®
I'm use FormView for editing a photo gallery... I add FileUpload control to
upload images to the Gallery.

I'm binding my Formview to objectdatasource
i tried upload images onItemInserting & onItemUpdating but no luck..
FindControl() didn't work and can't find my fileUpload control..
any help plzzzzzzzzzz??
I just upgraded to .net 2 and find to much problems with FindControl() in
template controls..
and also i face too many problems with objectdatasource

Author
17 May 2006 5:49 PM
vMike
Show quote Hide quote
"Islamegy®" <Islamegy@Private.4me> wrote in message
news:ug4KgjceGHA.4892@TK2MSFTNGP02.phx.gbl...
> I'm use FormView for editing a photo gallery... I add FileUpload control
to
> upload images to the Gallery.
>
> I'm binding my Formview to objectdatasource
> i tried upload images onItemInserting & onItemUpdating but no luck..
> FindControl() didn't work and can't find my fileUpload control..
> any help plzzzzzzzzzz??
> I just upgraded to .net 2 and find to much problems with FindControl() in
> template controls..
> and also i face too many problems with objectdatasource
>
>
You might use something like this. I use it for textboxes, but i would think
it would work for a fileinput control too.
dim ctl as FileUpoad =
ctype(yourformviewname.findcontrol("yourcontrolidname"),FileUpoad)
mike
Are all your drivers up to date? click for free checkup

Author
18 May 2006 8:00 AM
Islamegy®
Actually this didn't work:
FileUpload fu =(FileUpload)yourformviewname.findcontrol("myFileUpload1");

and after investigate anf try & error it worked like this
FileUpload fu
=(FileUpload)yourformviewname.Row.FindControl("myFileUpload1");

So i Discovered i must select findcontrol in the current Row even the
FormView display only one row per page!!!





Show quoteHide quote
"vMike" <MichZaelY.GeZor***@noZorY.geZwaYrrenY.com> wrote in message
news:98-dnRZK04qL__bZRVn-sQ@comcast.com...
>
> "Islamegy®" <Islamegy@Private.4me> wrote in message
> news:ug4KgjceGHA.4892@TK2MSFTNGP02.phx.gbl...
>> I'm use FormView for editing a photo gallery... I add FileUpload control
> to
>> upload images to the Gallery.
>>
>> I'm binding my Formview to objectdatasource
>> i tried upload images onItemInserting & onItemUpdating but no luck..
>> FindControl() didn't work and can't find my fileUpload control..
>> any help plzzzzzzzzzz??
>> I just upgraded to .net 2 and find to much problems with FindControl() in
>> template controls..
>> and also i face too many problems with objectdatasource
>>
>>
> You might use something like this. I use it for textboxes, but i would
> think
> it would work for a fileinput control too.
> dim ctl as FileUpoad =
> ctype(yourformviewname.findcontrol("yourcontrolidname"),FileUpoad)
> mike
>
>

Bookmark and Share