public void SendPost(string code)
{
// Create the web request object
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(Resource.Url);
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
//Start the request
webRequest.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback), webRequest);
}
I want to call the GetRequestStreamCallback with an parameter.
Does anyone know how to do this?
Use a lambda instead of a method group.
That is: