Search Results

Search found 6 results on 1 pages for 'druffmuff'.

Page 1/1 | 1 

  • login to website with post method

    - by druffmuff
    I want to log in into a website with c#. Here's the html code of the forumlar: <form action="http://www.site.com/login.php" method="post" name="login" id="login"> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr><td><b>User:</b></td><td colspan=\"2\"><b>Passwort:</b></td></tr> <tr> <td><input class="inputbg" name="user" type="text"></td> <td><input class="inputbg" name="password" type="password"></td> <td><input type="submit" name="user_control" value="Eingabe" class="buttonbg" ></td> </tr> </tbody></table></form> I actually tried it like this: HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.site.com/login.php"); request.Method = "POST"; using (StreamWriter writer = new StreamWriter(request.GetRequestStream(), Encoding.ASCII)) { writer.Write("user=user&password=pass&user_control=Eingabe"); } HttpWebResponse response = (HttpWebResponse)request.GetResponse(); using (StreamReader reader = new StreamReader(response.GetResponseStream())) { stream = new StreamWriter("login.html"); stream.Write(reader.ReadToEnd()); stream.Close(); } But this is not working. Any Ideas, why this is failing?

    Read the article

  • c# website login with post method

    - by druffmuff
    Hi, How can I with c sharp log me in into a website by using the post method? Any Ideas how to do this? Here's the html code of the forumlar: <form action="http://www.site.com/login.php" method="post" name="login" id="login"> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr><td><b>User:</b></td><td colspan=\"2\"><b>Passwort:</b></td></tr> <tr> <td><input class="inputbg" name="user" type="text"></td> <td><input class="inputbg" name="password" type="password"></td> <td><input type="submit" name="user_control" value="Eingabe" class="buttonbg" ></td> </tr> </tbody></table></form>

    Read the article

  • Opennetcf how to read sms messagestore with c#

    - by druffmuff
    I'm currently reading the messagestore with InTheHand, but I want to do this with OpenNetCF. Can someone post any samples? Here is how I do this with InTheHand: foreach (InTheHand.WindowsMobile.PocketOutlook.SmsMessage mess in sess.SmsAccount.SentItems) { if (mess.Received.Year == thisYear && mess.Received.Month == thisMonth) { smsThisMonth++; } }

    Read the article

  • c# how to read the message store on a windows mobile device 6

    - by druffmuff
    Hi, can anyone post an example how to read the messagestore on a windows mobile device 6? I done this with "InTheHand": foreach (InTheHand.WindowsMobile.PocketOutlook.SmsMessage mess in sess.SmsAccount.SentItems) { if (mess.Received.Year == thisYear && mess.Received.Month == thisMonth) { smsThisMonth++; } } The problem is, that I only have a evaluation version of InTheHand. I would like to do this with OpenNetCF or mapidotnet, if possible. But I didn't figure out how to do this with OpenNetCF and mapitdotnet isn't available anymore on the sourceforge site (http://sourceforge.net/projects/mapidotnet/). I only found it on the svn directory, but there are no dlls.

    Read the article

  • Using C# to HttpPost data to a web page

    - by druffmuff
    I want to log in into a website using C# code. Here's the html code of the example form: <form action="http://www.site.com/login.php" method="post" name="login" id="login"> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr><td><b>User:</b></td><td colspan=\"2\"><b>Password:</b></td></tr> <tr> <td><input class="inputbg" name="user" type="text"></td> <td><input class="inputbg" name="password" type="password"></td> <td><input type="submit" name="user_control" value="Submit" class="buttonbg"></td> </tr> </tbody></table> </form> This is what I have tried so far with unsuccessful results: HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.site.com/login.php"); request.Method = "POST"; using (StreamWriter writer = new StreamWriter(request.GetRequestStream(), Encoding.ASCII)) { writer.Write("user=user&password=pass&user_control=Eingabe"); } HttpWebResponse response = (HttpWebResponse)request.GetResponse(); using (StreamReader reader = new StreamReader(response.GetResponseStream())) { stream = new StreamWriter("login.html"); stream.Write(reader.ReadToEnd()); stream.Close(); } Any Ideas, why this is failing?

    Read the article

1