TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kevin
NA
3
10.4k
Get Element Value from Web browser control
Oct 31 2011 4:38 PM
I'm calling a asp.net web page in a winform webbrowser control.
The webbrowser is being used to take the user information and submit it the database, creating an item
On the winform I have a submit button that invokes ("click")
Dim doc As HtmlDocument
doc = WebBrowser1.Document
doc.GetElementById("btnsubmit").InvokeMember("Click")
Which works fine
After I need my winform to know what item was created. On my webpage I have a hidden field. After submit the hidden field is populated with the item value.
I now need the winform to read this value.
Dim doc As HtmlDocument = WebBrowser1.Document
Dim docelement As HtmlElement = doc.GetElementById("hdnitemid")
item_id = docelement.GetAttribute("value")
Not working item_id returns nothing.
If I look at the webpage source, the hidden value is populated with an value. I think posting the value on to another page will fix my issue, but I want to avoid doing that.
Help will be appreciated.
Reply
Answers (
1
)
Autocomplete in combobox of datagridview
How to call event delegates from another project in c#/winforms?