Once a UploadValuesCompleted Event has fired, is it possible to get the NameValueCollection that was uploaded in the request?
I want the possibility to resend a duplicate of a request.
I am doing something like this:
NameValueCollection data = new NameValueCollection();
data.Add("myParam", "myValue");
WC.Headers["Content-Type"] = "application/x-www-form-urlencoded";
WC.UploadValuesAsync(Url, "POST", data);
Your event handler can access
dataif you pass data to it, for example by using closure semantics or an instance variable.It could look like this:
The event handler now has access to
data.