简体   繁体   English

如何将HTML5移动Web应用程序连接到IIS服务器以从SQL Server数据库中获取信息?

[英]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. 我如何从sql server数据库中获取信息并将其传递到我的Web应用程序,以便内容是动态的。 How to make a connectivity between html5 and the server? 如何在html5和服务器之间建立连接? I know is using ajax any examples???? 我知道使用ajax的任何示例吗??? How to do it without jquery? 没有jQuery怎么办? With phonegap? 有电话间隙吗?

You can make an ajax call from your web app / phonegap app using jquery ajax like this.. 您可以使用jquery ajax从Web应用程序/ phonegap应用程序进行ajax调用。

$.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. 在这种情况下,yoursite.com是您的域,其代码后面的aspx页面将连接到sql server并获取数据。 You can also add some security to this using oAuth or some form of login token auth if you need to. 如果需要,您还可以使用oAuth或某种形式的登录令牌auth来为此添加一些安全性。 Does that help? 有帮助吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 ASP.NET 应用程序中备份和恢复 SQL Server 数据库并从网页获取备份文件? - How to backup and restore a SQL Server database in an ASP.NET app and get the backup file from a web page? 连接IIS和SQL Server - Connect IIS and SQL server SL应用程序不会从IIS连接到数据库,但是会从VS2010连接到-SQL Server身份验证,而不是Wndws身份验证 - SL app doesn't connect to Database from IIS, but does from VS2010 - SQL Server Auth, not Wndws Auth asp.net Web应用程序中的ADO是否总是使用IIS服务帐户连接到SQL Server? - Does ADO in an asp.net web app always use the IIS service account to connect to SQL Server? 如何使用客户端Windows凭据连接到Web中的SQL Server数据库 - How to connect to SQL Server database in web using client windows credentials 无法从Web服务器IIS7连接到OPC DA服务器 - can not connect to OPC DA Server from web server IIS7 SQL Server数据库将不会从网站更新信息 - SQL Server database will not update info from website 将IIS 7.5 Web窗体连接到SQL Server的最佳方法 - Best method to connect IIS 7.5 Web Forms to SQL Server 如何将 SQL 数据库连接到 web 上的 IIS 的网站托管站点? - How can I connect a SQL database to a webhosted site with IIS on the web? 如何允许来自ASP.NET Web应用程序和Windows服务的SQL Server数据库连接? - How to allow SQL Server database connection from an ASP.NET web app and a Windows service?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM