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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:32:37+00:00 2026-05-26T06:32:37+00:00

With using HtmlAgilityPack and c# 4.0 how can you determine whether page is being

  • 0

With using HtmlAgilityPack and c# 4.0 how can you determine whether page is being redirected or not. I am using this method to load page.

HtmlDocument hdMyDoc = hwWeb.Load(srPageUrl);

And example redirection result i suppose

Returned inner html

<meta http-equıv="refresh" content="0;URL=http://www.pratikev.com/fractalv33/pratikEv/pages/home.jsp">

c# 4.0

  • 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-26T06:32:38+00:00Added an answer on May 26, 2026 at 6:32 am

    For this case, parse the HTML is the best way.

    var page = "...";
    var doc = new HtmlDocument();
    doc.Load(page);
    var root = doc.DocumentNode;
    var select = root.SelectNodes("//meta[contains(@content, 'URL')]");
    try
    {
        Console.WriteLine("has redirect..");
        Console.WriteLine(select[0].Attributes["content"].Value.Split('=')[1]);
    }
    catch
    {
        Console.WriteLine("have not redirect using HTML");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using HtmlAgilityPack. I create an HtmlDocument and LoadHtml with the following string:
I am using HtmlAgilityPack. Is there a one line code that I can get
I am using C# with HtmlAgilityPack and I can select divs that have an
Can I put OR clause in node selection using HTMLAgility (HtmlAgilityPack.HtmlNodeCollection)doc.DocumentNode.SelectNodes(//td[@class=\roomPrice figure\]); What I
With using c# 4.0 and htmlagilitypack how can i read values inside certain table.
I have one winform application. I can get HTML of page using webclient call
Im using HtmlAgilityPack/HAP so that I can use Xpath with HTML documents. I need
I've been using the HtmlAgilityPack to eat some XHTML documents, however, if I want
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using TortoiseSVN against VisualSVN I delete a source file that I should not have

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.