Keith

Keith

  • NA
  • 1
  • 1.9k

How do I login to a remote website from my Visual Studio App

Apr 26 2013 6:21 PM
Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

End Sub

Private Sub Email_TextChanged(sender As Object, e As EventArgs) Handles Email.TextChanged

End Sub

Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged

End Sub

Private Sub Button13_Click(sender As Object, e As EventArgs) Handles Button13.Click


End Sub

Private Sub Button14_Click(sender As Object, e As EventArgs) Handles Button14.Click

End Sub

Private Sub Email_TextChanged(sender As Object, e As EventArgs) Handles Email.TextChanged

End Sub

Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles Password.TextChanged

End Sub

My Buttons are: Button 13 is my login button. Button 14 is my log out button.

Here is my submission login form which is on my external website:

<form method="post" action="/index/users/login">
<div style="display:none;"><input type="hidden" name="cs_xsrf_key" value="aee94da80bd5825752b1c50982e054ef" /></div>

<fieldset style="border: 0; padding: 0">
<input type="text" name="nick" value="E-Mail" onfocus="if(this.value=='Nick') this.value=''" onblur="if(this.value=='')this.value='Ni… maxlength="40" size="22" />

<input type="password" name="password" value="Pass" onfocus="if(this.value=='Pass') this.value=''" onblur="if(this.value=='')this.value='Pa… maxlength="40" size="22" />

<input type="checkbox" name="cookie" id="cookie" value="1" /> <label for="cookie"> Cookie</label>

<input type="hidden" name="uri" value="/index" />
<input type="submit" name="login" value="Submit" />
</fieldset>
</form>

Now, what I want to do is; use my application to log me in to my website through my visual studio form.

Can someone please help me with this step? As I really need some help with this part, as I have managed to build the rest of my application up until I got stuck with this bit.

I need someone to show me how the code should look to achieve this.

Many thanks.