I am using VS 2003 and the accept parameter neither comes
up in intellisense nor restricts the file types. Is this a
bug?
This is how the form is defined -
<form id="frmBreaks" method="post" runat="server"
enctype="multipart/form-data">
This is how the control is defined -
<INPUT id="inpFile1" type="file" name="inpFile1"
runat="server">
If I try to add the 'accept' property I have to do it by
hand as intellisense doesn't include it. When I do, I get
a red wavy line and the error "'Could not find any
attribute 'accept' of element 'input'".
If I add the property programatically, it seems to be
accepted, but it still doesn't restrict file type.
Anyone got an idea?
TIA, John 5 1113
Hi,
even if VS.NET shows that as red line, it doesn't prevent from using it.
VS.NEt's Intellisense ain't perfect either. Just ignore the message.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"John Mason" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl... I am using VS 2003 and the accept parameter neither comes up in intellisense nor restricts the file types. Is this a bug? This is how the form is defined - <form id="frmBreaks" method="post" runat="server" enctype="multipart/form-data">
This is how the control is defined - <INPUT id="inpFile1" type="file" name="inpFile1" runat="server">
If I try to add the 'accept' property I have to do it by hand as intellisense doesn't include it. When I do, I get a red wavy line and the error "'Could not find any attribute 'accept' of element 'input'".
If I add the property programatically, it seems to be accepted, but it still doesn't restrict file type.
Anyone got an idea?
TIA, John
"John Mason" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl... I am using VS 2003 and the accept parameter neither comes up in intellisense nor restricts the file types. Is this a bug?
See http://msdn.microsoft.com/workshop/a...input_file.asp
It doesn't list this parameter, so I take it IE doesn't handle it.
I seem to recall that this (useful!) parameter *is* in the HTML
specification, but that
few browsers support it (yet?).
Hans Kesting
Ah yes, very true, in MSDN docs there is that "There is no functionality
implemented for this property unless defined by the author"
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:ef**************@TK2MSFTNGP10.phx.gbl... "John Mason" <an*******@discussions.microsoft.com> wrote in message news:06****************************@phx.gbl... I am using VS 2003 and the accept parameter neither comes up in intellisense nor restricts the file types. Is this a bug? See http://msdn.microsoft.com/workshop/a...input_file.asp It doesn't list this parameter, so I take it IE doesn't handle it.
I seem to recall that this (useful!) parameter *is* in the HTML specification, but that few browsers support it (yet?).
Hans Kesting
Well, thanks for the responses guys but I'm still unable
to filter.
When I click the browse button on the control I just
get 'Files of Type: All Files (*.*)'
Am I to assume then that IE6 doesn't support this
functionality? -----Original Message-----
"John Mason" <an*******@discussions.microsoft.com> wrote
in messagenews:06****************************@phx.gbl... I am using VS 2003 and the accept parameter neither
comes up in intellisense nor restricts the file types. Is
this a bug? See http://msdn.microsoft.com/workshop/a...tml/reference/
objects/input_file.aspIt doesn't list this parameter, so I take it IE doesn't
handle it. I seem to recall that this (useful!) parameter *is* in
the HTMLspecification, but that few browsers support it (yet?).
Hans Kesting
.
Hi,
I believe you should try to do that filtering at the server.
Via the PostedFile.ContentType property of HtmlInputFile you can try to
check the type at the server.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
<an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl... Well, thanks for the responses guys but I'm still unable to filter. When I click the browse button on the control I just get 'Files of Type: All Files (*.*)' Am I to assume then that IE6 doesn't support this functionality?
-----Original Message-----
"John Mason" <an*******@discussions.microsoft.com> wrote in messagenews:06****************************@phx.gbl... I am using VS 2003 and the accept parameter neither comes up in intellisense nor restricts the file types. Is this a bug?
See http://msdn.microsoft.com/workshop/a...tml/reference/ objects/input_file.aspIt doesn't list this parameter, so I take it IE doesn't handle it. I seem to recall that this (useful!) parameter *is* in
the HTMLspecification, but that few browsers support it (yet?).
Hans Kesting
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: R Reyes |
last post by:
I am coding a forum and am having problems passing around the attachment file
(as an HtmlInputFile) from page to page. Sometimes the users may want to
preview their posts with the attachment specs...
|
by: Newbie |
last post by:
i have a c# asp.net webform that has an HtmlInputFile and a listbox (to hold
the filenames to be uploaded). but HtmlInputFile.PostedFile and
HtmlInputFile.Value are readonly properties. i have to...
|
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...
|
by: shimonsim |
last post by:
Hi,
I need to upload pictures from client machine and I am using HtmlInputFile
control I set validator to make sure that file has correct expention but if
one of the files has incorrect extention...
|
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...
|
by: Augusto Cesar via DotNetMonster.com |
last post by:
Hi, I want to customize the HtmlInputFile. I wanna something like an image
button to play the "browse" button hole and hide the textbox. Is that
possible?
I also have tried to hide an...
|
by: UJ |
last post by:
Guys,
I know this isn't the appropriate place to post this because it's HTML not
ASP.Net but I need some guidance. I have a web page with an HTMLInputFile on
it. The person enters the stuff,...
|
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...
|
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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,...
| |