Web browser control in Visual Studio .Net 2005 (J#)

Posted on 2009-03-31
Last Modified: 2013-12-17
Hi all

I am using the web browser control in visual studio .net 2005 (J#). I need to select & copy certain text content in the document.

I am using the attached code, but it returns the html source of the document not the text.

String x;

x = webBrowser1.get_DocumentText();


Open in new window

Question by:ehmf
LVL 19

Expert Comment

ID: 24027219
What is it you are after - ie what is the "text" ?

Expert Comment

ID: 24027415
how you want to select the text ?
via code ?
Can you explain your question ?
LVL 15

Accepted Solution

jinal earned 500 total points
ID: 24707420
Hello ,

Try to use following way. I am giving you C# example and it will help you out.

In button click of form.

textbox1.Text = Clipboard.GetText();

To select all text

textbox1.Text = Clipboard.GetText();

Let me know if you still have any problem.

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Name space syntax error 12 44
Anyway to make "All" the default in the dropdown? 6 34
Server Error 11 48
C# HTTP GET method sample code 3 42
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now