It has nothing to do with ASP.NET. You need to use the class
, but to obtain its instance you need to use the class
and its method
, as the run-time type is defined by the URI.
Find a code sample for login here: http://stackoverflow.com/questions/450380/login-to-the-page-with-httpwebrequest
]; HTTPS protocol is used the same way, the code is the same but the root certificate should be registered on the system, see
] and links from these articles.
Now, parsing of the response…
The ideal case would be if the response provided well-formed XML, which is well supported by .NET parsers. If this is not the case, you can find some HTML parser which does not assume well-formed XML. Try this one:
], Google for some more.