Extracts the nth HTML Form from the response content.
Namespace: Facilita.WebAssembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.7.98 (1.0.0.0)
Syntax
Parameters
- formIndex
- Type: System Int32
The zero-based index of the Form to look for in the response.
Return Value
The nth Form in the response.Remarks
Examples
Response response1 = request1.Send(); // Find the first form in the response, and store it in a variable Form loginForm = response1.ExtractForm(0); ... // Create a POST request that will send the modified loginForm back to the server Request request2 = WebBrowser.CreateRequest(HttpMethod.POST, url2, 2); // Fill in the form by specifying a username/password loginForm.GetInputElement("username").Value = "Bob Jones"; loginForm.GetInputElement("password").Value = "Pa55word"; // Attach the form to the request and send it to the server request2.SetMessageBody(loginForm); Response response2 = request2.Send();
See Also