简体   繁体   中英

Using AJAX/Jquery with custom ASP.NET web controls that call a web-service

I've written a simple ascx user control called myLight that I programtically add several instances of this control to my form. This control has two buttons ON and OFF , and it has an "ID" property

I also have a WCF webservice which has two methods ON and OFF as well as a Status function.

So the page will be setup with several instances of myLight and each instance will have a unique address. When the user clicks an ON/OFF button, the appropriate web-service will be called with the address for the control clicked. However I don't want the entire page to have to reload after each button press, rather just call the web-service.

After I get this part working, I'd like for each control to periodically call the Status function with its address so that it can update the color of the control, depending upon the return value.

I'm looking for suggestions on how to implement this. AJAX server controls, JQuery, etc.

to show you whole concept here is little long and tedious process so,for implementing ajax enabled wcf service, take a look at following link...

http://www.dotnetcurry.com/ShowArticle.aspx?ID=235

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM