// This function sets an HTTP header for // the Web request. function WebRequestHeader() { // Instantiate the WebRequest object. var wRequest =new Sys.Net.WebRequest(); // Set the request Url. wRequest.set_url(postPage); // Set the request verb. wRequest.set_httpVerb("POST"); var body ="Message=Hello! Do you hear me?" wRequest.set_body(body); // Set the value of the HTTP header's "Content-Length". wRequest.get_headers()["Content-Length"] = body.length; // Set the web request completed event handler, // for processing return data. wRequest.add_completed(OnWebRequestCompletedHeader); // Clear the results page element. GetElementById("ResultsId").innerHTML =""; // Execute the request. wRequest.invoke(); }