I open the C # form open parser here .
This is slightly more flexible than the one mentioned above, which applies to CodePlex, since you can use it for both Multipart and non-Multipart form-data , and also provides other form parameters formatted in the Dictionary object.
This can be used as follows:
non-frequent
public void Login(Stream stream) { string username = null; string password = null; HttpContentParser parser = new HttpContentParser(stream); if (parser.Success) { username = HttpUtility.UrlDecode(parser.Parameters["username"]); password = HttpUtility.UrlDecode(parser.Parameters["password"]); } }
of many
public void Upload(Stream stream) { HttpMultipartParser parser = new HttpMultipartParser(stream, "image"); if (parser.Success) { string user = HttpUtility.UrlDecode(parser.Parameters["user"]); string title = HttpUtility.UrlDecode(parser.Parameters["title"]);
Lorenzo polidori
source share