jonniebl
asked on
Auto login to a web site
I am using visual studio 2008 and trying to log on to a website, I can navigate using webbrowser fill in the email address and password. when I use the command to invoke submit, the login page just reappears with no info filled in. If I do not invoke submit, it navigates to the webpage and fills in the info. If I hit the input button, it proceeds to the next page wit no errors.
My code looks like this:
If WebBrowser1.ReadyState = WebBrowserReadyState.Compl ete Then
WebBrowser1.Document.All(" pass").Set Attribute( "value", Password)
WebBrowser1.Document.All(" email").Se tAttribute ("value", email1)
WebBrowser1.Document.Forms (0).Invoke Member("su bmit")
End If
The Html of the web page looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<META NAME="DESCRIPTION" CONTENT="Free web content articles in our article directory and catalog for your website. Read, submit, and publish our articles for free.">
<title>Article Directory and Catalog | Login</title>
<!-- embed_css reminder -->
<link rel="Stylesheet" href="https://www.articlecat.com/mainstyle.css" type="text/css" media="screen">
</head>
<body>
<script type="text/javascript">
window.google_analytics_ua cct = "UA-247184-17";
window.google_analytics_do main_name = ".articlecat.com";
</script>
<div id="bg">
<table align="center" class="maintable" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="topnav" width="100%">
<a href="http://www.articlecat.com" rel="nofollow"><img border="0" src="/images/logo.gif" width="427" height="100" alt="Free Articles Directory"></a>
</td>
<td width="200px">
<br><br><br>
</td>
</tr>
<tr>
<td width="100%" class="maincontentcell"><d iv class="page_title">Login</ div>
<p>To login please enter your email and password in the form below.</p>
<br><br><br>
<center>
<form name="clearform" action="https://www.articlecat.com/secure/login.php" method="post">
<table>
<tr>
<td width="33%" align="right" nowrap>Email:</td>
<td align="left"><input type="text" name="email" id="email" size="31" style="font-family: verdana; font-size: 9px; color: #333333; border: 1px solid #C0C0C0"></td>
</tr>
<tr>
<td width="33%" align="right" nowrap>Password:</td>
<td align="left"><input type="password" name="pass" id="pass" size="31" style="font-family: verdana; font-size: 9px; color: #333333; border: 1px solid #C0C0C0"></td>
</tr>
<tr>
<td align="right" nowrap> </td>
<td align="left"><input type="checkbox" name="remember" id="remember" value="remember">remember me </td>
</tr>
<tr>
<td width="33%"></td>
<td align="left" valign="middle">
<input type="submit" value="Login" name="B7" style="color: #333333; font-family: verdana; font-size: 9px; border: 1px solid #C0C0C0">
</td>
</tr>
<tr>
<td></td>
<td>
<a href="http://www.articlecat.com/recover.php" rel="nofollow">Forgot Password?</a> | <a href="https://www.articlecat.com/secure/signup.php" rel="nofollow">Register</a >
</td>
</tr>
</table>
</form>
</center>
<script type="text/javascript">
document.clearform.email.f ocus();
</script></td>
<td class="navcell">
<div id="navcontainer">
<br><br>
<div class="sectionheader">Auth ors</div>
<ul id="navigation2">
<li><a href="https://www.articlecat.com/secure/login.php" rel="nofollow">Login</a>&n bsp;|  ;<a href="https://www.articlecat.com/secure/signup.php" rel="nofollow">Signup</a>< /li>
<li><a href="http://www.articlecat.com/submitarticles.php" rel="nofollow">Submit Articles</a></li>
<li><a href="http://www.articlecat.com/terms.php" rel="nofollow">Terms and Conditions</a></li>
</ul>
<br>
<div class="sectionheader">Publ ishers & Readers</div>
<ul id="navigation3">
<li><a href="http://www.articlecat.com/rss_feeds.php">Subscribe to RSS feed</a></li>
<li><a href="http://www.articlecat.com/topauthors.php" rel="nofollow">Top 100 Authors</a></li>
<li><a href="http://www.articlecat.com/terms.php" rel="nofollow">Publishing Guidelines</a></li>
</ul>
<br>
<div class="sectionheader">Site </div>
<ul id="navigation4">
<li><a href="http://www.articlecat.com/aboutus.php" rel="nofollow">About Us</a></li>
<li><a href="http://www.articlecat.com/contacts.php" rel="nofollow">Contact Us</a></li>
<li><a href="http://www.articlecat.com/linkus.php" rel="nofollow">Link to Us</a></li>
<li><a href="http://www.articlecat.com/terms.php" rel="nofollow">Terms of Service</a></li>
<li><a href="http://www.articlecat.com/privacy.php" rel="nofollow">Privacy Policy</a></li>
</ul>
<br>
<br>
</div></td>
</tr>
</table>
</div>
<center>
<font face="Verdana" size="1">© 2006-2010 articlecat.com, All rights reserved.
<br>
<a href="http://www.articlecat.com">Free articles directory</a> | <a href="http://www.articlecat.com">Free articles</a> | <a href="http://www.articlecat.com">Submit articles</a> | <a href="http://www.articlecat.com/terms.php" target="_blank" rel="nofollow">Terms and Conditions</a>
</font>
</center>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-247184-17']);
_gaq.push(['_setDomainName ', '.articlecat.com']);
_gaq.push(['_trackPageview ']);
_gaq.push(['_trackEvent', 'calc', 'great', 'www.articlecat.com/secure/login.php', 9]);
(function() {
var ga = document.createElement('sc ript'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga. js';
var s = document.getElementsByTagN ame('scrip t')[0]; s.parentNode.insertBefore( ga, s);
})();
</script>
</body>
</html>
My code looks like this:
If WebBrowser1.ReadyState = WebBrowserReadyState.Compl
WebBrowser1.Document.All("
WebBrowser1.Document.All("
WebBrowser1.Document.Forms
End If
The Html of the web page looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<META NAME="DESCRIPTION" CONTENT="Free web content articles in our article directory and catalog for your website. Read, submit, and publish our articles for free.">
<title>Article Directory and Catalog | Login</title>
<!-- embed_css reminder -->
<link rel="Stylesheet" href="https://www.articlecat.com/mainstyle.css" type="text/css" media="screen">
</head>
<body>
<script type="text/javascript">
window.google_analytics_ua
window.google_analytics_do
</script>
<div id="bg">
<table align="center" class="maintable" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="topnav" width="100%">
<a href="http://www.articlecat.com" rel="nofollow"><img border="0" src="/images/logo.gif" width="427" height="100" alt="Free Articles Directory"></a>
</td>
<td width="200px">
<br><br><br>
</td>
</tr>
<tr>
<td width="100%" class="maincontentcell"><d
<p>To login please enter your email and password in the form below.</p>
<br><br><br>
<center>
<form name="clearform" action="https://www.articlecat.com/secure/login.php" method="post">
<table>
<tr>
<td width="33%" align="right" nowrap>Email:</td>
<td align="left"><input type="text" name="email" id="email" size="31" style="font-family: verdana; font-size: 9px; color: #333333; border: 1px solid #C0C0C0"></td>
</tr>
<tr>
<td width="33%" align="right" nowrap>Password:</td>
<td align="left"><input type="password" name="pass" id="pass" size="31" style="font-family: verdana; font-size: 9px; color: #333333; border: 1px solid #C0C0C0"></td>
</tr>
<tr>
<td align="right" nowrap> </td>
<td align="left"><input type="checkbox" name="remember" id="remember" value="remember">remember me </td>
</tr>
<tr>
<td width="33%"></td>
<td align="left" valign="middle">
<input type="submit" value="Login" name="B7" style="color: #333333; font-family: verdana; font-size: 9px; border: 1px solid #C0C0C0">
</td>
</tr>
<tr>
<td></td>
<td>
<a href="http://www.articlecat.com/recover.php" rel="nofollow">Forgot Password?</a> | <a href="https://www.articlecat.com/secure/signup.php" rel="nofollow">Register</a
</td>
</tr>
</table>
</form>
</center>
<script type="text/javascript">
document.clearform.email.f
</script></td>
<td class="navcell">
<div id="navcontainer">
<br><br>
<div class="sectionheader">Auth
<ul id="navigation2">
<li><a href="https://www.articlecat.com/secure/login.php" rel="nofollow">Login</a>&n
<li><a href="http://www.articlecat.com/submitarticles.php" rel="nofollow">Submit Articles</a></li>
<li><a href="http://www.articlecat.com/terms.php" rel="nofollow">Terms and Conditions</a></li>
</ul>
<br>
<div class="sectionheader">Publ
<ul id="navigation3">
<li><a href="http://www.articlecat.com/rss_feeds.php">Subscribe to RSS feed</a></li>
<li><a href="http://www.articlecat.com/topauthors.php" rel="nofollow">Top 100 Authors</a></li>
<li><a href="http://www.articlecat.com/terms.php" rel="nofollow">Publishing Guidelines</a></li>
</ul>
<br>
<div class="sectionheader">Site
<ul id="navigation4">
<li><a href="http://www.articlecat.com/aboutus.php" rel="nofollow">About Us</a></li>
<li><a href="http://www.articlecat.com/contacts.php" rel="nofollow">Contact Us</a></li>
<li><a href="http://www.articlecat.com/linkus.php" rel="nofollow">Link to Us</a></li>
<li><a href="http://www.articlecat.com/terms.php" rel="nofollow">Terms of Service</a></li>
<li><a href="http://www.articlecat.com/privacy.php" rel="nofollow">Privacy Policy</a></li>
</ul>
<br>
<br>
</div></td>
</tr>
</table>
</div>
<center>
<font face="Verdana" size="1">© 2006-2010 articlecat.com, All rights reserved.
<br>
<a href="http://www.articlecat.com">Free articles directory</a> | <a href="http://www.articlecat.com">Free articles</a> | <a href="http://www.articlecat.com">Submit articles</a> | <a href="http://www.articlecat.com/terms.php" target="_blank" rel="nofollow">Terms and Conditions</a>
</font>
</center>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-247184-17']);
_gaq.push(['_setDomainName
_gaq.push(['_trackPageview
_gaq.push(['_trackEvent', 'calc', 'great', 'www.articlecat.com/secure/login.php', 9]);
(function() {
var ga = document.createElement('sc
ga.src = ('https:' == document.location.protocol
var s = document.getElementsByTagN
})();
</script>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.