473,499 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FileUpload control not able to retain its value

Hi All,

I am working on a portal using .net2.0.

In one of my page, i have FileUpload control.

I am doing some server side validation for form fields in general. if
there is any validation missing control comes back to the user.

All other fields in the screens are retaining their values, but the
FileUpload control values (what ever file user has selected is not
retained).

I come across few references on the net saying that it is the default
nature of the control. server cannot set the FileUpload control file
value (this might enable the application developer to upload files
without knowledge of the end user).
In my case, i need to do this else it will be treated as a bug by
client.
If you are aware of any thing related to this,please do let me know.

-harinath

Dec 22 '06 #1
1 3251
As you saw this is by design (for safety reasons).

The only solutions I can think of are :
- doing client side validation
- validating using no postback à la AJAX
- making extra clear the all process for the customer
- changing the UI (for example uploading the file in its own pop window).
- others ?

---

Patrice

"Harinath" <ha***********@gmail.coma écrit dans le message de news:
11*********************@48g2000cwx.googlegroups.co m...
Hi All,

I am working on a portal using .net2.0.

In one of my page, i have FileUpload control.

I am doing some server side validation for form fields in general. if
there is any validation missing control comes back to the user.

All other fields in the screens are retaining their values, but the
FileUpload control values (what ever file user has selected is not
retained).

I come across few references on the net saying that it is the default
nature of the control. server cannot set the FileUpload control file
value (this might enable the application developer to upload files
without knowledge of the end user).
In my case, i need to do this else it will be treated as a bug by
client.
If you are aware of any thing related to this,please do let me know.

-harinath

Dec 22 '06 #2

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

Similar topics

5
1832
by: Uncle Ben | last post by:
How strong and reliable is the new ASP.NET 2.0 FileUpload control? By that, I mean is it reliable enough to accept 2-gigabyte file uploads per upload session? Also, is it possible or easy to...
12
15619
by: Phil Z. | last post by:
After migrating an ASP.NET 1.1 application to 2.0 we were getting "Cannot access a closed file" errors when uploading. I found a number of post on the subject and have since moved from using an...
3
5151
by: rn5a | last post by:
The ASPX FileUpload control displays a TextBox along with a 'Browse...' Button. Setting the different properties of this control just reflects the changes in the TextBox but not the Button. For...
8
7225
by: bsm | last post by:
Hi, I want to Set asp:fileupload Filename at runtime. When I try to do, it shows "Readonly" error. Anyway to achieve this.
0
1227
by: gomzi | last post by:
hi, How could one retain the value in the upload control on postbacks? i.e. Once the postback takes place, the path in the file upload control goes away!! thanks, gomzi.
5
12072
by: =?Utf-8?B?QmVydA==?= | last post by:
Hi How can you set the filename property in the asp:fileupload control? How can you persist the value of the chosen filename between postbacks? thanks B
2
11375
by: ronc85 | last post by:
My environment is ASP.NET 2.0, C# and AJAX. Is there a way to retain the Postedfile in the FileUpload control after Postback? I have this application I've inherited were the User chooses a file...
3
1233
by: Samuel | last post by:
Hi The FileUpload control doesn't seem to retain the path of the file to upload, is there a way to change that behaviour? Thank you, Samuel
5
2752
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...
0
7220
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...
1
6893
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...
0
5468
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,...
1
4918
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...
0
4599
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...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.