Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > FormView and FileUpload

Reply
Thread Tools

FormView and FileUpload

 
 
Islamegy®
Guest
Posts: n/a
 
      05-17-2006
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



 
Reply With Quote
 
 
 
 
vMike
Guest
Posts: n/a
 
      05-17-2006

"Islamegy®" <Islamegy@Private.4me> wrote in message
news:...
> 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


 
Reply With Quote
 
 
 
 
Islamegy®
Guest
Posts: n/a
 
      05-18-2006
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" <> wrote in message
news:98-dnRZK04qL__bZRVn-...
>
> "Islamegy®" <Islamegy@Private.4me> wrote in message
> news:...
>> 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
>
>



 
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
FileUpload Control in FormView using ObjectDataSource =?Utf-8?B?Z292ZXI=?= ASP .Net 0 09-02-2007 02:52 AM
FileUpload control and formView Inserting Event RosH ASP .Net 0 05-14-2007 10:11 AM
Formview FileUpload and ObjectDataSource Chris ASP .Net 5 03-31-2007 09:39 PM
Formview error with fileupload marygfrc ASP .Net 0 06-15-2006 01:43 AM
Referencing the fileupload in formview Chris ASP .Net 0 05-09-2006 09:38 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57