简体   繁体   中英

How to connect html5 mobile web app to an iis server to get info from the sql server database?

I think the question is self explanatory. How can i get info from sql server database and pass it to my web app so the content is dynamic. How to make a connectivity between html5 and the server? I know is using ajax any examples???? How to do it without jquery? With phonegap?

You can make an ajax call from your web app / phonegap app using jquery ajax like this..

$.ajax({
  url: "http://yoursite.com/getuser.aspx",
  context: document.body
}).done(function() { 
  $(this).addClass("done");
});

In this case yoursite.com is your domain and the aspx page in its code behind will connect to sql server and get data out. You can also add some security to this using oAuth or some form of login token auth if you need to. Does that help?

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