S
Steve Binney
The Web server I am communicating with has the requirement that the
content-type header comes before the content-disposition header. I am not
able to achieve this. When my code has the following:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(myUri);
req.ContentType = "application/x-DoCommand\r\n";
WebHeaderCollection col = new WebHeaderCollection();
col.Add("Content-Disposition: attachment; filename=\"" + textBox1.Text +
"\"\r\n");
It puts content-disposition in the header but not content-type
When I play with the order of lines of code:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(myUri);
WebHeaderCollection col = new WebHeaderCollection();
col.Add("Content-Disposition: attachment; filename=\"" + textBox1.Text +
"\"\r\n");
req.Headers = col;
req.ContentType = "application/x-DoCommand\r\n";
I get both but Content-Disposition is before Contentn-type.
How do I get type before disposition?
Steve Binney
content-type header comes before the content-disposition header. I am not
able to achieve this. When my code has the following:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(myUri);
req.ContentType = "application/x-DoCommand\r\n";
WebHeaderCollection col = new WebHeaderCollection();
col.Add("Content-Disposition: attachment; filename=\"" + textBox1.Text +
"\"\r\n");
It puts content-disposition in the header but not content-type
When I play with the order of lines of code:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(myUri);
WebHeaderCollection col = new WebHeaderCollection();
col.Add("Content-Disposition: attachment; filename=\"" + textBox1.Text +
"\"\r\n");
req.Headers = col;
req.ContentType = "application/x-DoCommand\r\n";
I get both but Content-Disposition is before Contentn-type.
How do I get type before disposition?
Steve Binney