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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:41:27+00:00 2026-06-11T13:41:27+00:00

I am trying to build a small desktop scoreboard which can get and show

  • 0

I am trying to build a small desktop scoreboard which can get and show live matches score in C#. Now when I call Xdocument.load(url) method on button click, it loads latest scores for the first time only, then keep showing the same score even though Xdocument.load() is defined to run on button click(as well as when Form loads,but I don’t think that will make a difference).
Now what I have found on google and stackoverflow is something like to see when file is updated,and related stuff. But all those are for local xml files. How do I solve my problem?

     public Form1()
    {
        InitializeComponent();
       // WebRequest.DefaultCachePolicy = new RequestCachePolicy(RequestCacheLevel.Revalidate);   
        feed = XDocument.Load(url);


    }

    private void button1_Click(object sender, EventArgs e)
    {
        feed = XDocument.Load(url + "?_=" + Guid.NewGuid().ToString());
         feed=XDocument.Load(url);
       // var nofmlive = feed.Root.Element("match").Attribute("srs");
        var output = GetItems();
        foreach (var v in output) {
       //rest of the code,,just to get and show data of all matches which are currently live
  • 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-11T13:41:27+00:00Added an answer on June 11, 2026 at 1:41 pm

    Maybe XDocument is caching the data. Try busting the cache by appending a Guid query string parameter parameter:

    var doc = XDocument.Load(url + "?_=" + Guid.NewGuid().ToString());
    

    Adjust the ? with & if you already have query string parameters in the url.

    You might also try changing the cache policy but the drawback of this approach is that it is global to all HTTP requests:

    WebRequest.DefaultCachePolicy = new RequestCachePolicy(RequestCacheLevel.Revalidate);
    var doc = XDocument.Load(url);
    

    Alternatively you may try loading the XML with a WebClient and then feeding it to the XDocument:

    using (var client = new WebClient())
    {
        string xml = client.DownloadString("http://synd.cricbuzz.com/j2me/1.0/livematches.xml?_=" + Guid.NewGuid().ToString());
        var doc = XDocument.Parse(xml);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build a GPS app which can show directions between 2
I'm trying to build a small app which allows downloading of multiple files at
G'day guys, trying to build a small invoicing system (that can generate PDF's using
I am trying to build a small application in C# which should start/stop an
Problem I am trying to build a small ruby script - which will be
I am trying to build a small page using django which uses a facebook
I get the following errors when trying to build a small and simple project
I am trying to build a small application in which the application will communicate
I am trying to build a small web application. The application is to store
I'm trying to build a small program that hosts vst effects and I would

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.