Last post Jul 27, 2018 10:07 AM by mariolopes
Jul 27, 2018 08:26 AM|mariolopes|LINK
I need to refresh one webpage with
It doesn't work with response.redirect();
In Chrome it doesn't work too, maybe one Chrome option has to be enabled but I don't know what
but I need to stop refreshing , i.e I need to refresh only one time.
Here is my code
protected void Page_Load(object sender, EventArgs e)
protected void Add_XML(object sender, EventArgs e)
//XElement xml = XElement.Load("c:\\calendar\\eventos_professor.xml");
XElement xml = XElement.Load("mypath\\eventos_professor.xml");
new XAttribute("title", "Agora sim"),
new XAttribute("start", "2018-07-23 19:45:00"),
new XAttribute("end", "2018-07-23 21:45:00")));
How to refresh onte time only after the Add_Xml?
Jul 27, 2018 08:38 AM|PatriceSc|LINK
You would need to know that Add_XML will be called to skip adding your refresh line. If you give the full picture there is perhaps another approach. Is suspect that rather than a real requirement, it coluld be your current approach for trying to solve a
problem you have maybe with caching ?
Jul 27, 2018 09:08 AM|mariolopes|LINK
Yes You're right
I have caching problems and I can't refresh the browser for reading my xml file. Please look at my other post to understand my problem
It only works in Firefox with the command
but I need to stop the command, otherwhise I can't insert events in my calendar.
I don't know why it does not refresh in Chrome, maybe one option is misconfigured ...
Jul 27, 2018 09:40 AM|PatriceSc|LINK
My understanding is that the issue is that the XML file requested using Ajax is cached. Have you tried change the jQuery cache option: see http://api.jquery.com/jquery.ajax/ and scroll down to "cache".
Jul 27, 2018 10:07 AM|mariolopes|LINK
You are 100% right
I spend 2 days to understant what was the problem, and now works fine. Great help, thank you