Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
QuestionIssue using the StreamWritter Class Pin
TwiztedFreek28-Feb-13 13:16
TwiztedFreek28-Feb-13 13:16 
AnswerRe: Issue using the StreamWritter Class Pin
TwiztedFreek28-Feb-13 13:18
TwiztedFreek28-Feb-13 13:18 
AnswerRe: Issue using the StreamWritter Class Pin
Garth J Lancaster28-Feb-13 14:08
professionalGarth J Lancaster28-Feb-13 14:08 
AnswerRe: Issue using the StreamWritter Class Pin
Jegan Thiyagesan28-Feb-13 23:33
Jegan Thiyagesan28-Feb-13 23:33 
AnswerRe: Issue using the StreamWritter Class Pin
Keith Barrow1-Mar-13 1:06
professionalKeith Barrow1-Mar-13 1:06 
AnswerRe: Issue using the StreamWritter Class Pin
Defens931-Mar-13 9:35
Defens931-Mar-13 9:35 
QuestionCopy username from text file to website Pin
Muhammad Sayyam28-Feb-13 2:17
Muhammad Sayyam28-Feb-13 2:17 
AnswerRe: Copy username from text file to website Pin
DaveyM6928-Feb-13 3:07
professionalDaveyM6928-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:
C#
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 Pin
Richard MacCutchan28-Feb-13 3:23
mveRichard MacCutchan28-Feb-13 3:23 
GeneralRe: Copy username from text file to website Pin
DaveyM6928-Feb-13 10:30
professionalDaveyM6928-Feb-13 10:30 
GeneralRe: Copy username from text file to website Pin
Muhammad Sayyam2-Mar-13 20:19
Muhammad Sayyam2-Mar-13 20:19 
GeneralRe: Copy username from text file to website Pin
DaveyM695-Mar-13 3:08
professionalDaveyM695-Mar-13 3:08 
GeneralRe: Copy username from text file to website Pin
DaveyM697-Mar-13 21:51
professionalDaveyM697-Mar-13 21:51 
Questiontooth numbers Pin
Jassim Rahma28-Feb-13 0:35
Jassim Rahma28-Feb-13 0:35 
AnswerRe: tooth numbers PinPopular
Pete O'Hanlon28-Feb-13 1:11
mvePete O'Hanlon28-Feb-13 1:11 
AnswerRe: tooth numbers Pin
GuyThiebaut28-Feb-13 2:03
professionalGuyThiebaut28-Feb-13 2:03 
QuestionVS2012, C# Office 2007 problem Pin
Daytona67527-Feb-13 9:34
Daytona67527-Feb-13 9:34 
AnswerRe: VS2012, C# Office 2007 problem Pin
Richard MacCutchan27-Feb-13 21:58
mveRichard MacCutchan27-Feb-13 21:58 
AnswerRe: VS2012, C# Office 2007 problem Pin
OriginalGriff27-Feb-13 22:40
mveOriginalGriff27-Feb-13 22:40 
Questionc# field type is less accessible than field (SOLVED!) Pin
jojoba201127-Feb-13 9:25
jojoba201127-Feb-13 9:25 
AnswerRe: c# field type is less accessible than field Pin
Jibesh27-Feb-13 9:39
professionalJibesh27-Feb-13 9:39 
AnswerRe: c# field type is less accessible than field PinPopular
Richard Deeming27-Feb-13 9:41
mveRichard Deeming27-Feb-13 9:41 
AnswerRe: c# field type is less accessible than field Pin
Matt T Heffron27-Feb-13 9:49
professionalMatt T Heffron27-Feb-13 9:49 
Question[DllImport("NetApi32.dll"... throws exception for first few times Pin
shoab.shah26-Feb-13 20:04
shoab.shah26-Feb-13 20:04 
AnswerRe: [DllImport("NetApi32.dll"... throws exception for first few times Pin
Richard MacCutchan26-Feb-13 22:33
mveRichard MacCutchan26-Feb-13 22:33 

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

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