Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Unable to get the data from a website with dynamically filled textboxes when accessing through myWb.Document.GetElementById("num1").InnerText;

$
0
0

Hi Team,

I am learning on webbrowser control and during the learning phase i have the following issue:-

My webbrowser [mywb in this case] is successfully navigating and displaying the website content in webbrowser control. However; that site has three textboxes with dynamically allocated text from asp script code behind; I have tried to display these textboxes values by providing the correct id of these textboxes in my visual studio 2013 code; but I am not receiving any data except null. Can you help me on this as early as possible.

asp code written to dynamically assign the data to textbox:-

<%
myvar=Request.form("some")

Response.write("<input type=text id=num1 value=" + myvar+ ">")

%>

The code written in VS 2013 to access the textbox  by its id when the DocumentCompleted event is triggered:-

--------------------------------------------------------------------

string mystr ="";

mystr = myWb.Document.GetElementById("num1").InnerText;

MessageBox.Show(mystr);

------------------------------------------------------------------------

Thank You in Advance.


Regards, Subhash Konduru


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>