473,396 Members | 1,996 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.

Problems with HTMLInputFile Control

On my web page, I want to let the user be able to browse for a file and
select it. For this i have used HTMLInputFile Control. But here I want to
restrict the type of the files the user can select. The user should be
presented the File open dialog box to pick his file.
How to do that ????

Further more I don't want the Text "Browse..." on the Button instead I want
"...". How to do that ?????
I am using ASP.Net with C# as the code behind
Nov 19 '05 #1
2 1217
1) Try
http://msdn.microsoft.com/library/de...ies/accept.asp
but it depends upon the browser

2) A trick would be to hit this button and add your own (that would trigger
the click event of the hidden button). IMO even this kind of scenario could
be made more restrictive later (for safety reasons it's likely the trend is
that this button will awlasy have the same appearence so that users are
supposed to know to this file).

Beyond that you'll have to swith to an ActiveX control, an applet, a .NET
control etc...

Patrice
--

"Nayak" <ud********@yahoo.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP10.phx.gbl...
On my web page, I want to let the user be able to browse for a file and
select it. For this i have used HTMLInputFile Control. But here I want to
restrict the type of the files the user can select. The user should be
presented the File open dialog box to pick his file.
How to do that ????

Further more I don't want the Text "Browse..." on the Button instead I want "...". How to do that ?????
I am using ASP.Net with C# as the code behind

Nov 19 '05 #2
Hi
Do you have a solution to this yet?

TIA

"Nayak" <ud********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
On my web page, I want to let the user be able to browse for a file and
select it. For this i have used HTMLInputFile Control. But here I want to
restrict the type of the files the user can select. The user should be
presented the File open dialog box to pick his file.
How to do that ????

Further more I don't want the Text "Browse..." on the Button instead I want "...". How to do that ?????
I am using ASP.Net with C# as the code behind

Nov 19 '05 #3

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

Similar topics

2
by: Skwish | last post by:
Hi, I have a page with a htmlInputFile that is working fine. However, if I go to another page, and then go back to the page with the htmlInputFile, I get the following error Warning: Page...
5
by: Ariel Dolan | last post by:
Can I use HtmlInputFile to only get the selected file name but not actually upload the file? Clicking the control's Browse button let's the user select a file. All I need is the HtmlInputFile...
9
by: Rob Meade | last post by:
Hi all, I've got some code here that builds a page dynamically, ie, added a table, rows, cells, controls in the cells and so on... Everything has gone fine until now, I need to add a 'File...
5
by: Grant Harmeyer | last post by:
I have an application that uses FreeTextBox 2.0 (http://www.freetextbox.com). FreeTextBox is a rich text editor that behaves similarly to MS Word. The FreeTextBox control has a button to insert...
4
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
0
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
7
by: Buddy Ackerman | last post by:
I created this class Public Class HTMLFileInput : Inherits System.Web.UI.HtmlControls.HtmlInputFile Public Property Data As String Get Return ViewState("HTMLFileInput.Data") End Get Set...
3
by: Dave Adler | last post by:
Is there any way to retain the value of an HtmlInputFile control through a postback? I do some server side validation on the page when it is submitted and if an error occurs on the page the...
8
by: Nathan Sokalski | last post by:
I have a System.Web.UI.HtmlControls.HtmlInputFile control that I use to submit files. After the file is successfully submitted, I want the field to be reset so that the user knows the file was...
7
by: cindy | last post by:
I have a System.Web.UI.HtmlControls.HtmlInputFile control that I use to submit files. Before the file is successfully submitted I validate another field on the form, it is the description of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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.