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 8999975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:15:05+00:00 2026-06-16T00:15:05+00:00

I am searching for .NET library/component which will allow me do following: Load web

  • 0

I am searching for .NET library/component which will allow me do following:

  1. Load web pages
  2. Execute linked JS
  3. Execute my own JS in page’s scope and return result of executing, which can be complex object or array of objects.

The only solution I have found so far is using WebBrowser object, but it requires a good chunk of boilerplate code to make everything work and it fails to work with an array of objects.
In the following code sample, I receive a RuntimeBinderException on dynamic val = o.a;

class Program
{
    [STAThread]
    static void Main(string[] args)
    {
        var t = new System.Threading.Thread(BrowserThread);
        t.SetApartmentState(System.Threading.ApartmentState.STA);
        t.Start();

        Console.ReadLine();
    }

    private static void BrowserThread()
    {
        var wb = new WebBrowser();
        wb.Navigate("http://google.com");
        wb.DocumentCompleted += (sender, args) =>
            {
                var head = wb.Document.GetElementsByTagName("head")[0];
                var script = wb.Document.CreateElement("script");
                dynamic el = script.DomElement;
                el.text = "function test(){return [{a:2},{a:2},{a:2}]}";
                head.AppendChild(script);
                dynamic result = wb.Document.InvokeScript("test");
                dynamic o = result.pop();
                dynamic val = o.a;
            };
        Application.Run();
    }
}

Can anyone provide an alternative solution or help to fix this one?

  • 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-16T00:15:06+00:00Added an answer on June 16, 2026 at 12:15 am

    you could try dynamic a = o[0].a; or dynamic a = result[0].a; and see if that helps…

    Another point: you should check the type of result by stepping though your code… this might help finding a working answer…

    Regarding alternatives there are some options:

    • WebKit.Net (free)

    • Awesomium
      It is based on Chrome/WebKit and works like a charm.
      There is a free license available but also a commercial one and if need be you can buy the source code 🙂

    • WatiN (also free)

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

Sidebar

Related Questions

I'm searching for a library (or codebase) which will allow the creation of an
I'm searching for a feature to enable loggin/tracing in ASP.NET MVC 4 Web Api.
I'm using the ASP.NET charting library (System.Web.UI.DataVisualization.Charting) and the SeriesChartType enumeration has a ton
I've started using .NET speech-to-text library (SpeechRecognizer) While googling and searching this site i
I am an asp.net web application developer and I always have used Enterprise Library
Searching about improving my .NET application's performance, I found the following articles on MSDN
I'm searching for a free component or library that could convert HTML to PostScript
Do you know of any .NET library which can decode several types of audio
Been searching the net for an example of how to convert HTML string markup
I've been searching the net hard for some javascript code that allows me to

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.