473,396 Members | 1,683 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,396 software developers and data experts.

Browse button clears on postback

Is there a way to prevent the contents of a file input box (browse button) from clearing when the page postback?

Also, while we're on the subject of browse buttons, is there a way to specify the browse dialog file name or file of type? For instance, I want the user to browse to look for a particular file name like "code.txt".

Thanks
Jul 30 '08 #1
1 1586
jhardman
3,406 Expert 2GB
Is there a way to prevent the contents of a file input box (browse button) from clearing when the page postback?
from the nature of your question it sounds like you are using ASP.NET (file extension: .aspx) rather than ASP (file extension: .asp). If that is the case, let me know and I will move your post to the correct location, otherwise the answer is:
Expand|Select|Wrap|Line Numbers
  1. <input type="file" name="myFileInput" value="<%=request.form("myFileInput")%>">
Also, while we're on the subject of browse buttons, is there a way to specify the browse dialog file name or file of type? For instance, I want the user to browse to look for a particular file name like "code.txt".
Expand|Select|Wrap|Line Numbers
  1. <input type="file" accept="*.txt" ...>
Jul 31 '08 #2

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

Similar topics

1
by: Chris Lasher | last post by:
Hello, I'm trying to write a tool to scrape through some of the Ribosomal Database Project II's (http://rdp.cme.msu.edu/) pages, specifically, through the Hierarchy Browser....
5
by: Fred | last post by:
Hi I am searching for a module, that would allow me to call files by using a 'browse' button. Is there any uniform module for browsing files, or is there a special module for *.txt files? Thanks...
5
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
7
by: Amadelle | last post by:
Hi all and thanks in advance, I am stuck! I can't figure out how to identify which button was clicked on my ASP.NET page in the PostBack event? So what I am trying to do is to is to have an if...
11
by: CW | last post by:
I have message entry screen that's causing me a bit of an issue. At the moment, there are 2 buttons, one is used to send message to another user (btnSend) and another is used to send messages to...
4
by: JJ | last post by:
Hi, I need to have a button cause an autopostback. How can I do this? I have textboxs on webform that supply values for a calc but not all will get filled at any particular time. So I need a...
1
by: Tim | last post by:
Hi All, I have a form that I dynamically build putting various text boxes and lables on it based on a SQL query. When a user clicks the submit button, the form clears it's self and is left with...
3
by: ApexData | last post by:
I am using code from the following links to establish a Browse File and Browse Folder dialog. http://www.mvps.org/access/api/api0001.htm http://www.mvps.org/access/api/api0002.htm This code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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...
0
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,...

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.