EDN Admin
Well-known member
Hi Guys,
I have been trying to fix this problem for hours now.<br/>
I am using VB.NET and my application has a webbrowser in which i am loading website using WebBrowser.Navigate() and in WebDocument.Completed event, I am getting the list of input HTML elements:-
<pre class="lang-cs prettyprint" style="padding:5px; border:0px; font-size:14px; vertical-align:baseline; background-color:#eeeeee; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; width:auto; max-height:600px; text-align:left <code style="margin:0px; padding:0px; border:0px; font-size:14px; vertical-align:baseline; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif webBrowser.Document.GetElementsByTagName("input")[/code][/code]
and looping through it and attaching an event like this:-
<span style="color:#333333; font-family:新宋体; font-size:13px; line-height:normal; text-align:left htmlElementObj.AttachEventHandler(<span style="border:0px; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:13px; line-height:normal; text-align:left; color:#a31515 "onclick"<span style="color:#333333; font-family:新宋体; font-size:13px; line-height:normal; text-align:left , <span style="border:0px; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:13px; line-height:normal; text-align:left; color:blue AddressOf<span style="color:#333333; font-family:新宋体; font-size:13px; line-height:normal; text-align:left InputClicked)
And my InputClicked method is like this:-
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin:0in 0in 0pt; outline:0px; padding-right:0px; color:#333333; font-size:13px; text-align:left; line-height:normal
<span style="border:0px; font-style:inherit; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:9.5pt <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue Private <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue Sub <span style="color:#333333; font-family:新宋体; font-size:13px; line-height:normal; text-align:left InputClicked <span style="border:0px; font-style:inherit; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:9.5pt (<span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue ByVal sender <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue As<span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue Object, <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue ByVal e <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue As<span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:#2b91af EventArgs)
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin:0in 0in 0pt; outline:0px; padding-right:0px; font-size:13px; text-align:left; line-height:normal
<span style="border:0px; font-style:inherit; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:9.5pt <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px <span style="color:#333333
<span style="color:#0000ff Handle the input
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin:0in 0in 0pt; outline:0px; padding-right:0px; color:#333333; font-size:13px; text-align:left; line-height:normal
<span style="border:0px; font-style:inherit; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:9.5pt <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue End <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue Sub
Now, when user clicks on input types in the page, the event is being called but inside this event, all I am getting is sender and e both Nothing.<br/>
What can be my possible problem??
I will be very glad if anyone can help me with this.
Thanks<br/>
<br/>
<br/>
<br/>
View the full article
I have been trying to fix this problem for hours now.<br/>
I am using VB.NET and my application has a webbrowser in which i am loading website using WebBrowser.Navigate() and in WebDocument.Completed event, I am getting the list of input HTML elements:-
<pre class="lang-cs prettyprint" style="padding:5px; border:0px; font-size:14px; vertical-align:baseline; background-color:#eeeeee; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; width:auto; max-height:600px; text-align:left <code style="margin:0px; padding:0px; border:0px; font-size:14px; vertical-align:baseline; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif webBrowser.Document.GetElementsByTagName("input")[/code][/code]
and looping through it and attaching an event like this:-
<span style="color:#333333; font-family:新宋体; font-size:13px; line-height:normal; text-align:left htmlElementObj.AttachEventHandler(<span style="border:0px; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:13px; line-height:normal; text-align:left; color:#a31515 "onclick"<span style="color:#333333; font-family:新宋体; font-size:13px; line-height:normal; text-align:left , <span style="border:0px; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:13px; line-height:normal; text-align:left; color:blue AddressOf<span style="color:#333333; font-family:新宋体; font-size:13px; line-height:normal; text-align:left InputClicked)
And my InputClicked method is like this:-
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin:0in 0in 0pt; outline:0px; padding-right:0px; color:#333333; font-size:13px; text-align:left; line-height:normal
<span style="border:0px; font-style:inherit; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:9.5pt <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue Private <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue Sub <span style="color:#333333; font-family:新宋体; font-size:13px; line-height:normal; text-align:left InputClicked <span style="border:0px; font-style:inherit; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:9.5pt (<span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue ByVal sender <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue As<span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue Object, <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue ByVal e <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue As<span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:#2b91af EventArgs)
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin:0in 0in 0pt; outline:0px; padding-right:0px; font-size:13px; text-align:left; line-height:normal
<span style="border:0px; font-style:inherit; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:9.5pt <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px <span style="color:#333333
<span style="color:#0000ff Handle the input
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin:0in 0in 0pt; outline:0px; padding-right:0px; color:#333333; font-size:13px; text-align:left; line-height:normal
<span style="border:0px; font-style:inherit; font-family:新宋体; margin:0px; outline:0px; padding:0px; font-size:9.5pt <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue End <span style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:blue Sub
Now, when user clicks on input types in the page, the event is being called but inside this event, all I am getting is sender and e both Nothing.<br/>
What can be my possible problem??
I will be very glad if anyone can help me with this.
Thanks<br/>
<br/>
<br/>
<br/>
View the full article