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

Help, Why can't upload file from normal html form ?

In asp.net/c#, it's easy to implement Upload file to web server, just use
Request.Files or Request.InputStream & runat=server form and type=file input
controls. But now, it's a problem for me how to invoke a .aspx code to upload
file from a outer html file or c/s application.

I want to upload file by my small vb6.0 program using MS Winsock Control,
just invoke web server side file "UploadFile.aspx". So firstly, I used the
following "testUploadFile.htm" to test "UploadFile.aspx" :

content of testUploadFile.htm :

<form id="Form1" method="post" action="UploadFile.aspx" enctype =
"multipart/form-data" >
<INPUT id=uploadfile1 type=file size=49 >
<input type=submit value="submit">
</form>
In UploadFile.aspx, Not any "runat=server" control, just only following
simple codes in UploadFile.aspx.cs :

private void Page_Load(object sender, System.EventArgs e)
{
Response.Write("uploaded file(s) count: " +
System.Web.HttpContext.Current.Request.Files.Count .ToString());
}

But it always prompted "uploaded file(s) count: 0", just can't get any file.
Thanks for any suggestion!
David W
Oct 1 '05 #1
0 1335

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

Similar topics

15
by: Simon | last post by:
I would like to create a very basic file upload add image form to add to my web site and to keep them in a "tmp" directory within my web hosting file manager once uploaded. I understand the basic...
0
by: new to add-in | last post by:
In asp.net/c#, it's easy to implement Upload file to web server, just use Request.Files or Request.InputStream & runat=server form and type=file input controls. But now, it's a problem for me how...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
0
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,...
0
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...
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?
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
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...

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.