Click here to Skip to main content
       

C#

 
AnswerRe: Issue using the StreamWritter Class PinmentorKeith Barrow1-Mar-13 1:06 
AnswerRe: Issue using the StreamWritter Class PinmemberDefens931-Mar-13 9:35 
QuestionCopy username from text file to website PinmemberMuhammad Sayyam28-Feb-13 2:17 
AnswerRe: Copy username from text file to website PinmentorDaveyM6928-Feb-13 3:07 
Are you trying to automatically fill and submit a login form?
 
If so, you can use a WebBrowser control to do this:
new WebBrowser().Navigate(
    url,
    "_blank",
    Encoding.Default.GetBytes(
        "username=" + username +
        "&userpass=" + userpass),
    "Content-Type: application/x-www-form-urlencoded");
where url, username and userpass are string variables containing the data. Obviously change the names of the fields to what the names are of the input fields of the original HTML form, and add other fields as required.
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: Copy username from text file to website PinmvpRichard MacCutchan28-Feb-13 3:23 
GeneralRe: Copy username from text file to website PinmentorDaveyM6928-Feb-13 10:30 
GeneralRe: Copy username from text file to website PinmemberMuhammad Sayyam2-Mar-13 20:19 
GeneralRe: Copy username from text file to website PinmentorDaveyM695-Mar-13 3:08 
GeneralRe: Copy username from text file to website PinmentorDaveyM697-Mar-13 21:51 
Questiontooth numbers PinmemberJassim Rahma28-Feb-13 0:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 30 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid