Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
message after login
MR alaa
8y
330
1
Reply
hi everybody i work with windows form web browers control i want to show message of sucess login or fail after passing info to web page
private
void
btnlog_Click(
object
sender, EventArgs e)
{
if
(webBrowserlogin.Url.PathAndQuery == (
"/bbbb/login.aspx"
))
{
HtmlElement ele = webBrowserlogin.Document.GetElementById(
"TextBox1"
);
if
(ele !=
null
)
ele.InnerText = txt1.Text.Trim();
ele = webBrowserlogin.Document.GetElementById(
"TextBox2"
);
if
(ele !=
null
)
ele.InnerText = txt2.Text.Trim();
ele = webBrowserlogin.Document.GetElementById(
"TextBox3"
);
if
(ele !=
null
)
ele.InnerText = txt3.Text.Trim();
var theElementCollectionChildNext = webBrowserlogin.Document.GetElementsByTagName(
"input"
);
foreach
(HtmlElement elChild
in
theElementCollectionChildNext)
{
if
(elChild.Id ==
"Button5"
)
{
elChild.InvokeMember(
"click"
);
break
;
}
}
}
}
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
c# winform search data
get all form and this child controls