Welcome Guest Search | Active Topics | Sign In | Register

Request.PostData - multipart/form-data and boundary Options
Jesper
Posted: Friday, January 29, 2016 7:28:22 AM
Rank: Newbie
Groups: Member

Joined: 1/29/2016
Posts: 4
Hello

Is it possible to use multipart/form-data with boundary when using Webbrowser.Request.PostData?

I am trying to do the same as I was posting a form with a file.

Thanks.
eo_support
Posted: Friday, January 29, 2016 12:42:25 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

You can not format the post data directly. You can only use file PostDataItem. The code will be something like this:

Code: C#
request.PostData.Add(new PostDataItem(full_path_of_the_file));


This will create a new PostDataItem with its Type property set to "File". The reason is the actual formatting/posting is done asynchronously by the browser engine. So you can only provide the file name.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.