473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 2909

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris | last post by:
I am using the formview in conjunction with the object datasource. On basic textual data it updates fine via the the update method but I would like to have a pdf file to upload. What is the best...
0
by: Chris | last post by:
I want to display a formview based on an objectdatasource. One of the things on the formview will be a link to a pdf. When I go into the edit template I would like a fileupload to display, which...
0
by: sandya | last post by:
here is the code i tried string ss; //FileUpload FileUpload1 = new FileUpload(); Label Labeltxt = new Label(); //FileUpload1 = FormView1.FindControl("FileUpLoad1") as FileUpload; FileUpload...
1
by: Horace Nunley | last post by:
Hi, in my formview "insertItem" template, I have a fileupload control that I need to handle when the page is saved. I can't get to that control, or any of the controls thru code. What gives? ...
2
by: sck10 | last post by:
Hello, I have 3 objects: LinkButton GridView FormView The LinkButton is used to open the FormView in Insert mode. The GridView provides a list of products. When the "Select" link is
6
by: Chris | last post by:
I want do my insert to a database using a formview bound to an objectdatasource. I also want to upload a file. I'm quite new to and this is just test code but Is there any way I can pass the file...
0
by: RosH | last post by:
Dear All, Please find below an Inserting Event code expected to trigger just before the insert event of a FormView control. Everything works just fine but the event throws an exception that the...
0
by: =?Utf-8?B?Z292ZXI=?= | last post by:
Hello, I have a Formview in insert mode with a fileUpload control on it. I'm trying to get the contents of the uploaded file passed to my ObjectDataSource to be persisted to my database. The...
1
by: bogdan | last post by:
Hi, I have a FormView where one of the items is a file name. All items come from a single data source. I'd like to have the file name also displayed in a FileUpload control on the same page. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.