Checking if logging to website is successful via C#
<p>How can I check whether the login is successful, or failed, is it something with cookies?
Here's my code:</p>

<pre><code> const string baseurl = "http://maplestory.nexon.net/Default.aspx?PART=/Main";
    CookieContainer cookie;
    public Login(string user, string password)
    {

        HttpWebRequest req = (HttpWebRequest)WebRequest.Create(baseurl);
        req.Method = "POST";
        req.ContentType = "application/x-www-form-urlencoded";
        string login = string.Format("userID={0}&amp;password={1}&amp;device_id={2}", user, password, "24275770-88e0-4e");
        byte[] postbuf = Encoding.ASCII.GetBytes(login);
        req.ContentLength = postbuf.Length;
        Stream rs = req.GetRequestStream();
        rs.Write(postbuf, 0, postbuf.Length);
        rs.Close();
         cookie = req.CookieContainer = new CookieContainer();

         WebResponse resp = req.GetResponse();
         resp.Close();

    }


}
</code></pre>

<p>I don't know if I really logged in. and BTW is there anything wrong with the current code?
Thank you very much.</p>
