D
darin dimitrov
Hello,
I have the following Html form:
<form name="submitForProcess"
action="http://localhost/xml/process.aspx" method="post"
enctype="multipart/form-data">
<input type="text" name="customerId" value="5" /><br />
<input type="text" name="customerName" value="Johnson" /><br />
<input type="file" name="customerPhoto"><br />
<input type="submit" value="OK" />
</form>
In the ASP.NET page which is supposed to process this request I can
get the uploaded file name, length and content using the Request.Files
collection. Using the Request.Form collection I can get the
"customerId" and "customerName" parameters with their values.
My problem is that I cannot get the name attribute of my input file
tag which in this case is "customerPhoto". The Request.Form collection
doesn't contain this parameter. I am desperate, please help me, is it
possible to get this value using .NET classes ?
Here is the the dialog between the client and the server:
---------------------------------------------------------------------------
POST /xml/process.aspx HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, */*
Accept-Language: fr
Content-Type: multipart/form-data;
boundary=---------------------------7d4ea18310688
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET
CLR 1.1.4322)
Host: localhost
Content-Length: 1067
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASP.NET_SessionId=iwqfb3ju33u05cfx5jfajsys
-----------------------------7d4ea18310688
Content-Disposition: form-data; name="customerId"
5
-----------------------------7d4ea18310688
Content-Disposition: form-data; name="customerName"
Johnson
-----------------------------7d4ea18310688
Content-Disposition: form-data; name="customerPhoto";
filename="C:\Inetpub\wwwroot\xml\config.xml"
Content-Type: text/xml
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<parameters>
<BizTalkListenLocationParameter>BizTalkListenLocation</BizTalkListenLocationParameter>
<MainNamespaceParameter>xmlns</MainNamespaceParameter>
</parameters>
<options>
<Debug>True</Debug>
</options>
<!--
Following are the network credential attributes for the
BizTalkListenerLocation application
If they are not explicitly set then the application
will use the currently connected user credentials.
-->
<credentials>
<Username></Username>
<Password></Password>
<Domain></Domain>
</credentials>
</configuration>
-----------------------------7d4ea18310688--
I have the following Html form:
<form name="submitForProcess"
action="http://localhost/xml/process.aspx" method="post"
enctype="multipart/form-data">
<input type="text" name="customerId" value="5" /><br />
<input type="text" name="customerName" value="Johnson" /><br />
<input type="file" name="customerPhoto"><br />
<input type="submit" value="OK" />
</form>
In the ASP.NET page which is supposed to process this request I can
get the uploaded file name, length and content using the Request.Files
collection. Using the Request.Form collection I can get the
"customerId" and "customerName" parameters with their values.
My problem is that I cannot get the name attribute of my input file
tag which in this case is "customerPhoto". The Request.Form collection
doesn't contain this parameter. I am desperate, please help me, is it
possible to get this value using .NET classes ?
Here is the the dialog between the client and the server:
---------------------------------------------------------------------------
POST /xml/process.aspx HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, */*
Accept-Language: fr
Content-Type: multipart/form-data;
boundary=---------------------------7d4ea18310688
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET
CLR 1.1.4322)
Host: localhost
Content-Length: 1067
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASP.NET_SessionId=iwqfb3ju33u05cfx5jfajsys
-----------------------------7d4ea18310688
Content-Disposition: form-data; name="customerId"
5
-----------------------------7d4ea18310688
Content-Disposition: form-data; name="customerName"
Johnson
-----------------------------7d4ea18310688
Content-Disposition: form-data; name="customerPhoto";
filename="C:\Inetpub\wwwroot\xml\config.xml"
Content-Type: text/xml
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<parameters>
<BizTalkListenLocationParameter>BizTalkListenLocation</BizTalkListenLocationParameter>
<MainNamespaceParameter>xmlns</MainNamespaceParameter>
</parameters>
<options>
<Debug>True</Debug>
</options>
<!--
Following are the network credential attributes for the
BizTalkListenerLocation application
If they are not explicitly set then the application
will use the currently connected user credentials.
-->
<credentials>
<Username></Username>
<Password></Password>
<Domain></Domain>
</credentials>
</configuration>
-----------------------------7d4ea18310688--