0

I have a page that is on a 60 timer. The following piece of code does this on tick:

protected void RefreshButton_Click(object sender, EventArgs e)
    {
        ReportRepeater.DataBind();
        ReportUpdatePanel.Update();
    }

This web app will be placed in a "kiosk" mode on a tablet and will only be used for viewing that web app. If I make a change to CSS and publish it to the server, I have to explicitly refresh the page before the style changes take effect. Just updating the UpdatePanel isn't good enough. Is there some way in the code above I can tell it to go get that or should I maybe use another timer that every x number of minutes/hours it does a complete page reload? I tried some googling but came up short - likely because this I already have the only viable solution or this is a rare situation.

anna
  • 585
  • 1
  • 6
  • 22
Burning Hippo
  • 787
  • 1
  • 20
  • 47

1 Answers1

0

1) Provide a source (service, view, etc.) of yielding the new CSS from the server.

2) Use javascript on the clientside (example) to load the CSS from the service. Use a client-side javascript timer to perform the requests.

EDIT: I just remembered that you might get a 303 error if the CSS URL isn't changing. Consult this example if that's an issue. Also - the commenters beat me to it with that source (although I legitimately dug that one ;))

Community
  • 1
  • 1
Adam Kewley
  • 1,224
  • 7
  • 16