Click here to Skip to main content
15,891,653 members
Home / Discussions / C#
   

C#

 
GeneralRe: fixed width text file Pin
Iman Mohtashemi22-Jul-10 9:21
Iman Mohtashemi22-Jul-10 9:21 
GeneralRe: fixed width text file Pin
Keith Barrow22-Jul-10 9:35
professionalKeith Barrow22-Jul-10 9:35 
AnswerRe: fixed width text file Pin
Samuel Cherinet22-Jul-10 9:38
Samuel Cherinet22-Jul-10 9:38 
GeneralRe: fixed width text file Pin
Iman Mohtashemi22-Jul-10 9:42
Iman Mohtashemi22-Jul-10 9:42 
Questionshowing text in the pdf in the user defined format Pin
Dhyanga22-Jul-10 8:57
Dhyanga22-Jul-10 8:57 
AnswerRe: showing text in the pdf in the user defined format Pin
Peace ON22-Jul-10 19:22
Peace ON22-Jul-10 19:22 
QuestionHow to correct X Axis scale label in .Net Chart Control Pin
Daniel Tong22-Jul-10 8:24
Daniel Tong22-Jul-10 8:24 
QuestionWebBrowser control automation question Pin
Etienne_12322-Jul-10 6:57
Etienne_12322-Jul-10 6:57 
Hi
I`m trying to automate navigation of a WebBrowser control by automatically filling in some fields and clicking a button to log a user in. I get it working by searching for the appropriate Input tags, and then setting their values. I submit the form by calling SendKeys("{Enter}"). However, I run into trouble sometimes using this SendKeys method, because this means that the WebBrowser control always needs to have focus. The reason why I didn't search for the Login button and calling its click event, is because I don't know how. The username and password fields both have unique name and id fields that identify them.
Below is a snippet of Facebook's login page. If anyone can go through this and tell me how I would call the click method on the login button, I would appreciate it. Or can I call a "form submit" method somehow? I've underlined what I think the Login button is:

<div class="menu_login_container"><form method="POST" action="https://login.facebook.com/login.php?login_attempt=1" id="login_form" onsubmit=";var d=document.documentElement;if (d.onsubmit) { return d.onsubmit(event); }else { return Event.fire(d, &quot;submit&quot;, event); }"><input type="hidden" name="charset_test" value="&euro;,&acute;,€,´,水,Д,Є" /><input type="hidden" id="locale" name="locale" value="en_US" autocomplete="off" /><table cellspacing="0"><tr><td class="html7magic"><label for="email">Email</label></td><td class="html7magic"><label for="pass">Password</label></td></tr><tr><td><input type="text" class="inputtext" name="email" id="email" value="" tabindex="1"></input></td><td><input type="password" class="inputtext" name="pass" id="pass" tabindex="2"></input></td><td><label class="uiButton uiButtonConfirm uiButtonMedium"><input value="Login" tabindex="4" type="submit"></input></label></td></tr><tr><td class="login_form_label_field"><input type="checkbox" class="inputcheckbox" value="1" id="persistent" name="persistent" tabindex="3"></input><label id="label_persistent" for="persistent">Keep me logged in</label></td><td class="login_form_label_field"><a href="http://www.facebook.com/reset.php" rel="nofollow">Forgot your password?</a></td></tr></table><input type="hidden" name="charset_test" value="&euro;,&acute;,€,´,水,Д,Є" /><input type="hidden" id="lsd" name="lsd" value="iV6iE" autocomplete="off" /></form><br />
</div></ul></div></div>



And then also, if I may ask, is there any way I can programatically log a user out of Facebook? Maybe using a custom URL?
AnswerRe: WebBrowser control automation question Pin
Etienne_12322-Jul-10 7:07
Etienne_12322-Jul-10 7:07 
QuestionMy TextBox lacks discipline and Forms.Focus Pin
GrenMeera22-Jul-10 5:48
GrenMeera22-Jul-10 5:48 
AnswerRe: My TextBox lacks discipline and Forms.Focus Pin
Peace ON22-Jul-10 19:45
Peace ON22-Jul-10 19:45 
GeneralRe: My TextBox lacks discipline and Forms.Focus Pin
GrenMeera23-Jul-10 3:08
GrenMeera23-Jul-10 3:08 
QuestionPassing a Varible to a TextBox in ReportViewer Pin
cgillespie22-Jul-10 3:56
cgillespie22-Jul-10 3:56 
QuestionDynamic Dictionary usage problem in C# Pin
glitteringsound22-Jul-10 3:22
glitteringsound22-Jul-10 3:22 
QuestionMDIChild form in FULLSCREEN mode Pin
frommi22-Jul-10 0:05
frommi22-Jul-10 0:05 
AnswerRe: MDIChild form in FULLSCREEN mode Pin
Peace ON22-Jul-10 0:16
Peace ON22-Jul-10 0:16 
GeneralRe: MDIChild form in FULLSCREEN mode Pin
frommi22-Jul-10 0:25
frommi22-Jul-10 0:25 
GeneralRe: MDIChild form in FULLSCREEN mode Pin
Peace ON22-Jul-10 2:04
Peace ON22-Jul-10 2:04 
GeneralRe: MDIChild form in FULLSCREEN mode Pin
Ravi Bhavnani22-Jul-10 4:19
professionalRavi Bhavnani22-Jul-10 4:19 
GeneralRe: MDIChild form in FULLSCREEN mode Pin
Matt U.22-Jul-10 11:57
Matt U.22-Jul-10 11:57 
AnswerRe: MDIChild form in FULLSCREEN mode Pin
Niyamat22-Jul-10 7:47
Niyamat22-Jul-10 7:47 
Questionhow to auto Refresh a control in windows application Pin
Krishna Varadharajan21-Jul-10 23:20
Krishna Varadharajan21-Jul-10 23:20 
AnswerRe: how to auto Refresh a control in windows application Pin
Peace ON22-Jul-10 0:09
Peace ON22-Jul-10 0:09 
GeneralRe: how to auto Refresh a control in windows application Pin
Krishna Varadharajan22-Jul-10 20:10
Krishna Varadharajan22-Jul-10 20:10 
Questionreplacing html entity [modified] Pin
varsh1221-Jul-10 22:43
varsh1221-Jul-10 22:43 

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.