Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-03-31
4
Medium Priority
?
1,247 Views
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();
textBox1.set_Text(x);

Open in new window

0
Comment
Question by:ehmf
[X]
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
4 Comments
 
LVL 19

Expert Comment

by:daveamour
ID: 24027219
What is it you are after - ie what is the "text" ?
0
 
LVL 2

Expert Comment

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

Accepted Solution

by:
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.

webBrowser1.Focus();
System.Windows.Form.SendKeys.SendWait("^c");
textbox1.Text = Clipboard.GetText();

To select all text

webBrowser1.Focus();
System.Windows.Form.SendKeys.SendWait("^a^c");
textbox1.Text = Clipboard.GetText();

Let me know if you still have any problem.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

598 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