windows phone - webClient.DownloadString load new string -



windows phone - webClient.DownloadString load new string -

it's code:

public void pobierzsuchary() { webclient webclient = new webclient(); webclient.downloadstringcompleted += new downloadstringcompletedeventhandler(webclient_downloadstringcompleted); webclient.downloadstringasync(new uri("http://../michal/suchary.txt")); } void webclient_downloadstringcompleted(object sender, downloadstringcompletedeventargs e) { toastprompt toast = new toastprompt { background = new solidcolorbrush(colors.green), message = "suchary zostaƂy pobrane" }; string[] sucharytab = e.result.split('@'); messagebox.show(sucharytab[1]); .. }

button runs pobierzsuchary() , downloading string, have problem when press sec time button. see in messagebox older value, changed string on server(manually). have disable applications , run 1 time again see new string

this happens because windows phone automatically caches values repeat calls.

just append random number onto end of webclient call

something this

random ran = new random(); webclient.downloadstringasync(new uri("http://../michal/suchary.txt?ran="+ran.next().tostring()));

windows-phone webclient

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -