473,516 Members | 2,889 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Two input(File) in same webpage

58 New Member
Hi,
I have two input(file) controls in a web page. When clicking on first control browse button it is selecting a file and assigning into the textbox. When clicking on second control(browse button) the value in the first control(in textbox) is getting cleared. i need to avoid that one. Is there any way....


Please help.....

Regards,
Deepa
Mar 13 '09 #1
1 1058
Frinavale
9,735 Recognized Expert Moderator Expert
This is not normal behaviour if these are the steps that are happening:
  • user clicks browse button (file upload 1)
  • file open dialogue is displayed
  • user selects file and clicks ok
  • file open dialogue is closed and path is placed into text box
  • user clicks browse button (file upload 2)
  • file open dialogue is displayed
  • user selects file and clicks ok
  • file open dialogue is closed and path is placed into text box

However if these are the steps:
  • user clicks browse button (file upload 1)
  • file open dialogue is displayed
  • user selects file and clicks ok
  • file open dialogue is closed and path is placed into text box
  • user clicks a button, link button, or otherwise causes a postback to the server

Then it is correct that the text is cleared from the FileUpload control.

You cannot access the TextBox of the FileUpload control to replace the path. This is for security reasons. For instance, you could be writing code that places a path to sensitive data (like a password file or something) instead of what the user intended.

Therefore, if your page is posting back to the server, the FileUpload control will be cleared. There is no changing this behaviour.

So, again I ask, why is your FileUpload control getting cleared?

-Frinny
Mar 13 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1978
by: Richard | last post by:
I have a client who needs to upload the same 7 files twice a week to his web server. FTP is unfortunately not an option as the client is a novice, so I have created an admin interface to his website so he can easily upload the necessary files. The upload pages uses simple input file tags. Server side is AspUpload. However, the client is...
6
1826
by: Eric Lavigne | last post by:
Here is a shell command (MS-DOS): debug\curve-fit <input.txt >output.txt And here is a Python script that *should* do the same thing (and almost does): import os inputfilename = 'input.txt' outputfilename = 'output.txt'
5
2213
by: google | last post by:
first, a little background... i have a C program which preprocesses some data, and then outputs the results into a text file. that text file, in turn, is used as input to a FORTRAN computational fluid dynamics (CFD) program. the FORTRAN program goes to work on the provided data, and outputs a text file which i read back in with another C...
2
12483
by: Rob Manger | last post by:
Hi Guys, Urgent problem. Trying to compile my solution I get the following error: Linking... LINK: fatal error LNK1181: cannot open input file 'Release\icmpping.abj' Note, I havn't changed anything. This project was developed on another computer that is setup exactly the same way.
9
2169
by: paczkow | last post by:
Dear Python Community, I am an engineering and I am experiencing some trouble. Having output data from other software I want to use it. To achieve this I decided to use Python since this language is the best known for me. So.. for my future Python script, the input data are in form of: 1 1233.2E-3 2123.2323 2E+2 3453.3E+1...
5
6077
by: jwright | last post by:
I have decided to use a struct to collect my data. The input file is comma dilineated between almost all of the fields. Here is the code I have so far and a sample input and output file. #include <fstream> #include <iostream> #include <iomanip> using namespace std; struct pyrll
0
4908
by: srikar | last post by:
Hi all, I am having a problem, when I am compiling the code in 32 bit option on a 64 bit machine using the macro CPPFLAGS= -m32 I am getting the following warnings from the linker . /`../bin/amd64_stat_gnu_02015/WriteFault.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file...
28
2415
by: n00m | last post by:
Both codes below read the same huge(~35MB) text file. In the file 1000000 lines, the length of each line < 99 chars. Stable result: Python runs ~0.65s C : ~0.70s Any thoughts?
0
888
by: Fredrik Lundh | last post by:
David Bikard wrote: Was that supposed to be prog_name.py <input_file >output_file ? (< and does i/o redirection; random google link: http://www.ss64.com/ntsyntax/redirection.html
0
7276
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
7182
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
7408
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
7581
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...
1
5110
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
4773
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
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
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 we have to send another system
0
488
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.