Represents an HTML form.
Inheritance Hierarchy
Facilita.Web HtmlElement
Facilita.Web Form
Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.7.98 (1.0.0.0)
Syntax
public class Form : HtmlElement
Remarks
Examples
The form is then usually modified by changing the HtmlElement objects it contains, and sent back to the server on a later request.
Response response = request.Send();
Form form = response.ExtractForm(0);
Examples
// Create a Url with the form data as a query string Url url1 = new Url("http://localhost/"); url1 = url1.WithQuery(form); // Create a GET request based on the url and send it to the web server. Request request1 = WebBrowser.CreateRequest(HttpMethod.GET, url1, 1); // Send the request to the web server Response response1 = request1.Send();
Examples
// Create a Url Url url2 = new Url("http://localhost/"); // Create a POST request and set the form data as the message body Request request2 = WebBrowser.CreateRequest(HttpMethod.POST, url2, 2); request2.SetMessageBody(form); // Send the the request to the web server Response response2 = request2.Send();
See Also