473,569 Members | 2,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Referencing the fileupload in formview

I want to display a formview based on an objectdatasourc e. 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 can be used to upload a new pdf. I
would like my object to be as reusable as possible. Can anyone recommend a
way of referencing the fileupload control in as flexible way as possible.
The thing I would like to avoid is using my object on several different
forms and having to code some way to reference the fileuploads in the
itemupdating event of which could be in lots of different places on
different forms. I thought of using the find control event but the
containers could differ. Regards, Chris.
May 10 '06 #1
0 1094

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
324
by: Neil | last post by:
I want to be able to set the enabled status of certain controls on the edititem template of a formview control based on whether a check box is checked or not (or the value coming from the database as stored by the sqldatasource) . I've tried code such as: CheckBox cb = (CheckBox)FormView1.Row.FindControl("SysDefMethod"); Button ub =...
2
2926
by: Islamegy® | last post by:
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...
4
3431
by: Ned Balzer | last post by:
Can anyone explain why in the following code, where btnCancel1 is a Button inside the itemTemplate of the formview, the first call to change the text of the button, in the Page_Load sub, works fine, but the second call, in the bookFormView_ItemUpdated sub, throws an exception (Object reference not set to an instance of an object)? And if you...
4
5666
by: Dave | last post by:
If you had a FileUpload control inside of a FormView...how would you use FindControl to access the FileUpload properties? Let me just say that (FileUpload)FormView1.FindControl(FileUpload1).FileName doesn't work. The purpose is to insert a graphic in the InsertItemTemplate section of the form. I'm using the expample that's in the online...
6
7319
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 as a byte array and manipulate it in my business object. Currently what I have is this, but my byte array in my business object is nothing. It's like...
0
2760
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 Method called by the Insert method takes a parametare called DocBlob of type byte for the file contents. When I generate an object datasource using...
1
1354
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. Ideally I'd like to have the FileUpload control embedded in a FormView so the file name appears only once on the page. Is this possible? What are...
5
2760
by: =?Utf-8?B?VEQgaXMgUFNQ?= | last post by:
I have a FileUpload control within a FormView (although I tried it outside the FormView and got the same result) in the InsertTemplate. When the <Insertbutton is clicked and the Insert Command is executed the FileUpload is cleared of it's value and hence during Insert there is no file to "insert". I even tried this with a separate button...
0
1093
by: pauld | last post by:
Hello- Note: this is all VB/Asp.net 2.0 I have a formview(insert template) whose fields are bound to a datagrid that is connects to an MS SQL Server 2005 database. One of the options on the form is to allow user to upload a photo. I want to store just the photo name in the db. To accommodate this there's a link to a "Photo Upload" page...
0
7698
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8122
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.