469,572 Members | 1,571 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

FormView and FileUpload

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

May 17 '06 #1
2 2674

"Islamegy®" <Is******@Private.4me> wrote in message
news:ug**************@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("yourcontrolidn ame"),FileUpoad)
mike
May 17 '06 #2
Actually this didn't work:
FileUpload fu =(FileUpload)yourformviewname.findcontrol("myFileU pload1");

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

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

"vMike" <Mi****************@noZorY.geZwaYrrenY.com> wrote in message
news:98********************@comcast.com...

"Islamegy®" <Is******@Private.4me> wrote in message
news:ug**************@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("yourcontrolidn ame"),FileUpoad)
mike

May 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Chris | last post: by
reply views Thread by Chris | last post: by
reply views Thread by sandya | last post: by
1 post views Thread by Horace Nunley | last post: by
2 posts views Thread by sck10 | last post: by
6 posts views Thread by Chris | last post: by
reply views Thread by =?Utf-8?B?Z292ZXI=?= | last post: by
1 post views Thread by bogdan | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.