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

What is the proper code for file uploading.

I have tried everyway i know both Input type=file and asp.net 2.0
asp:uploadfile and continue to run into road blocks at one point or another.

The objective is as follows:

Allow user to upload multiple files of a specific extension (i.e. .jpg). In
addition to uploading to a specific directory, I need to extract the
filename and extension to store in a database (don't worry about the
database side).

I have tried UploadFile but get a parsing error on the <asp:UploadFile line.

I had input working except for restricting file extension type.

Any and all help will be greatly appreciated.

Thank you in advance for all you help.
Jan 18 '06 #1
4 1240
Your form tag should be something like this..
<form method="post" enctype="multipart/form-data"
action="upload.asp">
"Mark Sandfox" wrote:
I have tried everyway i know both Input type=file and asp.net 2.0
asp:uploadfile and continue to run into road blocks at one point or another.

The objective is as follows:

Allow user to upload multiple files of a specific extension (i.e. .jpg). In
addition to uploading to a specific directory, I need to extract the
filename and extension to store in a database (don't worry about the
database side).

I have tried UploadFile but get a parsing error on the <asp:UploadFile line.

I had input working except for restricting file extension type.

Any and all help will be greatly appreciated.

Thank you in advance for all you help.

Jan 18 '06 #2
<INPUT id="filename" type="file" size="59" name="filename" runat="server">

"Mark Sandfox" wrote:
I have tried everyway i know both Input type=file and asp.net 2.0
asp:uploadfile and continue to run into road blocks at one point or another.

The objective is as follows:

Allow user to upload multiple files of a specific extension (i.e. .jpg). In
addition to uploading to a specific directory, I need to extract the
filename and extension to store in a database (don't worry about the
database side).

I have tried UploadFile but get a parsing error on the <asp:UploadFile line.

I had input working except for restricting file extension type.

Any and all help will be greatly appreciated.

Thank you in advance for all you help.

Jan 18 '06 #3
Mark,

This article covers everything you should need:

http://msdn.microsoft.com/asp.net/de...UploadASP2.asp

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Mark Sandfox" <No****@NoSpam.com> wrote in message
news:y4***************@newssvr12.news.prodigy.com. ..
I have tried everyway i know both Input type=file and asp.net 2.0
asp:uploadfile and continue to run into road blocks at one point or
another.

The objective is as follows:

Allow user to upload multiple files of a specific extension (i.e. .jpg).
In addition to uploading to a specific directory, I need to extract the
filename and extension to store in a database (don't worry about the
database side).

I have tried UploadFile but get a parsing error on the <asp:UploadFile
line.

I had input working except for restricting file extension type.

Any and all help will be greatly appreciated.

Thank you in advance for all you help.

Jan 18 '06 #4
Yes that much i knew, but thank you. The problem arrises when using the
input type=file method is that i can not get the filter to only allow .jpg.
Any suggestions?

"sudheer kota" <su*********@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
Your form tag should be something like this..
<form method="post" enctype="multipart/form-data"
action="upload.asp">
"Mark Sandfox" wrote:
I have tried everyway i know both Input type=file and asp.net 2.0
asp:uploadfile and continue to run into road blocks at one point or
another.

The objective is as follows:

Allow user to upload multiple files of a specific extension (i.e. .jpg).
In
addition to uploading to a specific directory, I need to extract the
filename and extension to store in a database (don't worry about the
database side).

I have tried UploadFile but get a parsing error on the <asp:UploadFile
line.

I had input working except for restricting file extension type.

Any and all help will be greatly appreciated.

Thank you in advance for all you help.

Jan 18 '06 #5

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

Similar topics

8
by: Michel | last post by:
What free programs, where to download and how to install and start programming a dynamic website that enables visitors to log in, lookup and write data in/from a serversite database. So how can I...
9
by: R. Rajesh Jeba Anbiah | last post by:
Q: How should I handle file upload? A: File uploading requires HTML form of content type "multipart/form-data". The file content has to be POSTed/submitted via the form and once the file is...
2
by: Daniel Reber | last post by:
I have an application that is sending a file to a location on a network. I have a windows service that is monitoring that location for new files and then processing them. Sometimes the service...
0
by: Astra | last post by:
Hi All Wondered if you could help. I've created a web site system that a number of users use on their sites, but I manage each individual site/system on my ISP's server. Creating updates to...
1
by: wenqiang7 | last post by:
I am encountering a very strang problem with file uploading in my ASP.Net page. When we try to upload certain file, we'll get an error msg of "Cannot find server or DNS Error". We are running...
0
by: santybanty20 | last post by:
sir,i have written the code for file uploading but it is very slow like it takas 2 to 3 minutes for 5 kb file and for 1 mb abt 20 minutes.so here is my code please help me for fast uploading also the...
1
by: King | last post by:
Hello, I would like to check to see if the file that I am uploading to my server is of type CSV. I am currently doing that with the following snippet: HttpPostedFile file =...
3
ganesanji
by: ganesanji | last post by:
hi all, I have written a php coding for uploading a file to a specific folder or location in server which is a Linux server. I think the coding for file uploaing is correct. But it does not...
1
by: MAggIK | last post by:
Hi, I'm developing an application, that uploads and downloads files using httpwebrequests. I've encountered some problems considering timeouts while uploading large files. I wanted to know what...
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
0
BarryA
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...
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
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
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.