Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8236623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:11:33+00:00 2026-06-07T19:11:33+00:00

What I have is simple, a form with in that form a webbrowser-controll. That

  • 0

What I have is simple, a form with in that form a webbrowser-controll.

That webbrowser goes to a website. And that all works.

But what I wan’t to do when he’s on the page is to let him run some javascript code (or jQuery if that’s possible) to get all the text thats between the <b></b> tags on the website.

How should I do that?

EDIT:
Thanks to Birk, the code now looks like this:

HtmlElementCollection bigFontTags = webBrowser1.Document.GetElementById("Frame_A").Document.GetElementsByTagName("b");
            string[] textPieces = new string[bigFontTags.Count];
            for (int i = 0; i < bigFontTags.Count; i++) {
                textPieces[i] = bigFontTags[i].InnerText;
            }
            //process text
            string bigText = String.Join(" ", textPieces);
            MessageBox.Show(bigText);

But that doesn’t work. That is because the element that i need to get, is deep inside frame’s and frameset’s…. This is the layout (simple):

<frameset rows="0,1000" border="0" frameborder="0">

    <frame src="/mail/Login?domain=telfort.nl&amp;style=default&amp;plain=0" name="SContentFrame" id="SContentFrame" scrolling="Auto" noresize="">
    <frameset rows="88,*" framespacing="0" frameborder="0" border="0" bordercolor="#FFFFFF">

        <frameset cols="182,*" framespacing="0" frameborder="0" border="0" bordercolor="#FFFFFF" onunload="ExitLogout()" onload="LoadFrames('/mail/Navigation?sid=1FBE4F29181F18D9358ABC082C7DEE1B6C67481B&amp;userid=marcmeesters%40telfort.nl&amp;seq=+Q&amp;auth=+A&amp;style=default','/mail/MessageList?sid=1FBE4F29181F18D9358ABC082C7DEE1B6C67481B&amp;userid=marcmeesters%40telfort.nl&amp;seq=+Q&amp;auth=+A&amp;srcfolder=INBOX&amp;chk=1&amp;style=default')">

        <frame src="/supp/blank.htm" name="Frame_A" id="Frame_A" frameborder="0" scrolling="Yes" marginwidth="0" marginheight="0" bordercolor="#FFFFFF" border="0">
        <form name="phoenix" method="post" action="" onsubmit="return clickedButton">
And then are here some tables and the content that i want to get.....

So how can i get that content from there??? (in a nice way???)

EDIT2:
I will post the generated source of the website: (NOTE! i’ve deleted everything that wassn’t relevant… So only the way from the begin to the content)

<html><head>
<title>Telfort - Webmail</title>
<link rel="SHORTCUT ICON" href="http://www.telfort.nl/images/template/favicon.ico">
<link rel="stylesheet" href="/style/telfort/stylesheet.css" type="text/css" media="screen">
<!-- main.tpl 20001107 -->
<script type="text/javascript" src="/supp/phsec.js"></script>
<script type="text/javascript" src="/supp/client_sniffer.js"></script>

<script type="text/javascript" src="chrome-extension://bfbmjmiodbnnpllbbbfblcplfjjepjdn/js/injected.js"></script></head>
<frameset rows="0,1000" border="0" frameborder="0">
    <frame src="/mail/Login?domain=telfort.nl&amp;style=default&amp;plain=0" name="SContentFrame" id="SContentFrame" scrolling="Auto" noresize="">
        <html><head>
        <title>Telfort - Webmail</title>
        <link rel="SHORTCUT ICON" href="http://www.telfort.nl/images/template/favicon.ico">
        <link rel="stylesheet" href="/style/telfort/stylesheet.css" type="text/css" media="screen">
        <!-- main.tpl 20001107 -->
        <script type="text/javascript" src="/supp/phsec.js"></script>
        <script type="text/javascript" src="/supp/client_sniffer.js"></script>
        </head>
        <frameset rows="0,1000" border="0" frameborder="0">
            <frame src="/mail/Login?domain=telfort.nl&amp;style=default&amp;plain=0" name="SContentFrame" id="SContentFrame" scrolling="Auto" noresize="">
                <html><head>
                <title>Telfort - Webmail</title>
                <link rel="stylesheet" href="/style/telfort/stylesheet.css" type="text/css" media="screen">
                <!-- main_frame.tpl 20060510 -->
                <script src="/supp/phif.js" type="text/javascript"></script>
                <script type="text/javascript">
                <!--
                function LoadFrames(t1,t2) {
                  NavWin(frames["Frame_NAV"],t1);
                  NavWin(frames["Frame_A"],t2);
                }

                function ExitLogout() {
                  window.open(NavURL("/mail/Logout?sid=5D3995C305E2F91F575EDF1E2F11F5D75A7DF6D8&userid=marcmeesters%40telfort.nl&seq=+Q&auth=+A&style=default&popup=1"),"Logout","resizable=yes,scrollbars=yes,status=0,width=10,height=10");
                }
                //-->
                </script>
                </head>
                <frameset rows="88,*" framespacing="0" frameborder="0" border="0" bordercolor="#FFFFFF">
                    <frameset cols="182,*" framespacing="0" frameborder="0" border="0" bordercolor="#FFFFFF" onunload="ExitLogout()" onload="LoadFrames('/mail/Navigation?sid=5D3995C305E2F91F575EDF1E2F11F5D75A7DF6D8&amp;userid=marcmeesters%40telfort.nl&amp;seq=+Q&amp;auth=+A&amp;style=default','/mail/MessageList?sid=5D3995C305E2F91F575EDF1E2F11F5D75A7DF6D8&amp;userid=marcmeesters%40telfort.nl&amp;seq=+Q&amp;auth=+A&amp;srcfolder=INBOX&amp;chk=1&amp;style=default')">
                        <frame src="/supp/blank.htm" name="Frame_A" id="Frame_A" frameborder="0" scrolling="Yes" marginwidth="0" marginheight="0" bordercolor="#FFFFFF" border="0">
                            <html><head>
                            <title>Berichtenlijst</title>
                            <!-- folders_msglist.tpl 20001106 -->

                            <link rel="stylesheet" href="/style/telfort/stylesheet.css" type="text/css" media="screen">
                            </head>
                            <body marginwidth="0" marginheight="0">
                            <form name="phoenix" method="post" action="" onsubmit="return clickedButton">

                            AND HERE THE CONTENT!!!!
                            </form>
                    </frameset>
                </frameset>
        </frameset>
</frameset>
</html>

EDIT 3 :
Thanks to Birk, the problem is solved, and this is the answer:

HtmlWindow SContentFrame = webBrowser1.Document.Window.Frames[1];
            HtmlWindow Frame_A = SContentFrame.Document.Window.Frames[2];
            HtmlElementCollection bigFontTags = Frame_A.Document.GetElementsByTagName("b");
            string[] textPieces = new string[bigFontTags.Count];
            for (int i = 0; i < bigFontTags.Count; i++) {
            textPieces[i] = bigFontTags[i].InnerText;
            }
            string bigText = String.Join(" ", textPieces);
            MessageBox.Show(bigText);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T19:11:35+00:00Added an answer on June 7, 2026 at 7:11 pm

    Create a DocumentCompleted-event and process all tags using ((WebBrowser)sender).Document.GetElementsByTagName("b");.

    private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
            {
                HtmlElementCollection bigFontTags = ((WebBrowser)sender).Document.GetElementsByTagName("b");
                string[] textPieces=new string[bigFontTags.Count];
                for (int i = 0; i < bigFontTags.Count; i++)
                {
                    textPieces[i] = bigFontTags[i].InnerText;
                }
                //process text
                string bigText = String.Join(" ", textPieces);
                MessageBox.Show(bigText);
            }
    

    That’s not JavaScript, but the result is exactly the same.

    EDIT #2: For all those nested frames you could use:

    HtmlElementCollection bigFontTags = webBrowser1.Document.GetElementById("SContentFrame").Document.GetElementById("SContentFrame").Document.GetElementById("Frame_A").Document.GetElementsByTagName("b");
    

    That should work, if I understand your frameset structure correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple form that passes to an ASPX page to watch a
I have a simple contact form that works in every browser, except IE. It
I have a simple form that behaves as expected when method=GET , but when
I have a WebBrowser in my form that accesses a website that is too
I have a simple form that looks like this: <%= simple_form_for @study,:url => studies_path,
I have a simple form that looks like so <% remote_form_for post, :url =>
I have a simple form that searches through the 2000+ issues of a 3rd
So i have a simple form that takes a few inputs (two text and
I currently have a simple form that when you click the save button will
I'm creating a form. As of right now I have simple MAILTO form that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.