Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / January 2006

Tip: Looking for answers? Try searching our database.

What is the proper code for file uploading.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Sandfox - 18 Jan 2006 19:57 GMT
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.
sudheer kota - 18 Jan 2006 20:35 GMT
Your form tag should be something like this..
<form method="post" enctype="multipart/form-data"
action="upload.asp">

> 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.
[quoted text clipped - 13 lines]
>
> Thank you in advance for all you help.
Mark Sandfox - 18 Jan 2006 20:50 GMT
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?

> Your form tag should be something like this..
> <form method="post" enctype="multipart/form-data"
[quoted text clipped - 20 lines]
>>
>> Thank you in advance for all you help.
Albert Pascual - 18 Jan 2006 20:43 GMT
<INPUT id="filename" type="file" size="59" name="filename" runat="server">

> 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.
[quoted text clipped - 13 lines]
>
> Thank you in advance for all you help.
S. Justin Gengo [MCP] - 18 Jan 2006 20:48 GMT
Mark,

This article covers everything you should need:

http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/U
ploadASP2.asp


Signature

Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
                           Nietzsche

>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
[quoted text clipped - 15 lines]
>
> Thank you in advance for all you help.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.