locked
Call web service on interval RRS feed

  • Question

  • User-1126439996 posted

    In my mobile web site on need to call a website every 2000 milliseconds and if I find data redirect the browser to a new page. Can someone suggest a way to accomplish this without a total page refresh?

    Thursday, August 23, 2007 4:09 PM

All replies

  • User-1052551871 posted

    yes u can do it if is webservice... also in windows mobile is suported threads so my gues is tu use threads... u can du it by setting slleap for 2000 milliseconds for that thread thets call your webservice...

    Friday, August 24, 2007 4:37 AM
  • User-1126439996 posted

    Thanks for the reply. 

    Not sure I was clear on the problem. I have a mobile asp.net website. I also have a webservice set up. From a page on the website I need to call a method on the webservice every 2000 milliseconds. I don't have any problem doing this with a timer in code behind page. The question is how to I redirect the clients browser to a new page if I find the correct data from the webservice method?

    Friday, August 24, 2007 8:55 AM
  • User-1126439996 posted

    Thanks again. I think the TimerForm may be the way to go.

     

    I have another question not really related but I am a newbie to ASP and Mobile so that makes for real fun. I am usually a C# application developer so this is another world altogether. When I detect some data at web service I need to be able to play a sound on the mobile device. Sort of an alert.

    Friday, August 24, 2007 6:34 PM
  • User-1126439996 posted

    At first glance I thought this was what I needed. I can do the call this way but it is not very elogant. The TimerControl approach does a page refresh thereby causing the form to reload. I will calling this every two seconds. The Form has some buttons on it so if a user needs to click a button chances are the form will be reloading making it very non - user friendly. In addition, the page will be rendering every two seconds causing much more network traffic. I was hoping to find a partial page approach where all I would do is call the webservice every two seconds and not render the entire form.

    Monday, August 27, 2007 6:04 PM