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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:19:28+00:00 2026-05-26T09:19:28+00:00

I am working on creating an Internet Explorer add on using BandOjects and C#

  • 0

I am working on creating an Internet Explorer add on using BandOjects and C# Windows Forms Application, and am testing out parsing HTML source code. I have been currently parsing information based on the URL of the site.

I would like to get HTML source of the current page of an example site I have that uses a login. if I use the URL of the page I am on, it will always grab the source of the login page rather than the actual page, as my app doesn’t recognize that I logged in. would i need to store my login credentials for the site using some kind of api? or is there a way to grab the current page of the HTML regardless? I would prefer the latter as it seemingly would be less trouble. Thanks!

  • 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-05-26T09:19:29+00:00Added an answer on May 26, 2026 at 9:19 am

    I use this method in one of my apps:

    private static string RetrieveData(string url)
        {
    
            // used to build entire input
            var sb = new StringBuilder();
    
            // used on each read operation
            var buf = new byte[8192];
            try
            {
                // prepare the web page we will be asking for
                var request = (HttpWebRequest)
                                         WebRequest.Create(url);
    
               /* Using the proxy class to access the site
                * Uri proxyURI = new Uri("http://proxy.com:80");
                request.Proxy = new WebProxy(proxyURI);
                request.Proxy.Credentials = new NetworkCredential("proxyuser", "proxypassword");*/
    
                // execute the request
                var response = (HttpWebResponse)
                                           request.GetResponse();
    
                // we will read data via the response stream
                Stream resStream = response.GetResponseStream();
    
                string tempString = null;
                int count = 0;
    
                do
                {
                    // fill the buffer with data
                    count = resStream.Read(buf, 0, buf.Length);
    
                    // make sure we read some data
                    if (count != 0)
                    {
                        // translate from bytes to ASCII text
                        tempString = Encoding.ASCII.GetString(buf, 0, count);
    
                        // continue building the string
                        sb.Append(tempString);
                    }
                } while (count > 0); // any more data to read?
    
            }
            catch(Exception exception)
            {
                MessageBox.Show(@"Failed to retrieve data from the network. Please check you internet connection: " +
                                exception);
            }
            return sb.ToString();
        }
    

    You have to just pass the url of the web page for which you need to retrieve the code.

    For example:

    string htmlSourceGoggle = RetrieveData("www.google.com") 
    

    Note: You can get un-comment the proxy configuration if you use proxy to access the internet. Replace the proxy address, username and password with the one you use.

    For logging in via code. check this: Login to website, via C#

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

Sidebar

Related Questions

I am working on creating a thread safe control for my windows forms application.
I am working on creating a daemon in Ruby using the daemons gem. I
I'm working on creating a self updating application and one issue I'm running into
I am working on creating an MVC application for an existing Bug tracker of
I'm working on creating a web shop for a friend and I'm using the
I'm working creating rails application and wondered where I can find good tutorials on
working on creating an XML file with some data using Python. I am trying
I'm working on creating a dashboard. I have started to refactor the application so
I've been creating Windows Powershell scripts to automate Web UI Testing for the past
I have been working on creating a e-commerce store using Magento and I think

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.