please help
how to get the after login page of particular url.
private void button2_Click(object sender, EventArgs e)
{
string strId = "abc";
string strName = "xyz";
ASCIIEncoding encoding = new ASCIIEncoding();
string postData = "login=" + strId;
postData += ("&password=" + strName + "&commit=Log+in");
byte[] data = encoding.GetBytes(postData);
// Prepare web request...
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create("https://[here any url]/");
myRequest.Method = "POST";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream = myRequest.GetRequestStream();
// Send the data.
newStream.Write(data, 0, data.Length);
newStream.Close();
WebResponse response = myRequest.GetResponse();
MessageBox.Show(((HttpWebResponse)response).StatusDescription);
newStream = response.GetResponseStream();
StreamReader reader = new StreamReader(newStream);
string responseFromServer = reader.ReadToEnd();
MessageBox.Show(responseFromServer);
reader.Close();
newStream.Close();
response.Close();
}