user38230
user38230

Reputation: 665

Post large data in C#

I have the following scenario

  1. Have a web browser control which uses the Navigate method to call a web page. I have the need to post a large number of elements via FORM POST. The number of elements can be either 40-100 elements.

Is it advisable to encode this and send it via the the Navigate method?

Does one normally do this via FORM POST or is there a better solution? I may be able to get the client to expose a webservice and maybe i could stream an xml file to them

Upvotes: 1

Views: 754

Answers (1)

JoshBerke
JoshBerke

Reputation: 67068

I don't see an issue with 40-100 elements. How much data is being sent are you talking MB's? Web Servers do have limits (Which are configurable) on how large a post can be.

Depending on the actual scenaior I'd look at packaging all the elements into Xml and sending them that way (I've felt it easier to program against Xml when the elements have a relationship you can model it in the Xml).

You could also post the Xml using XmlHttpRequest, then you don't nessecarially need a web service at the other end just a page that knows to read the request body.

Upvotes: 1

Related Questions