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

Posted on 2009-03-31
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 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