0

我很想知道是否有人用经典的 ASP 在 JQuery Mobile 中做过任何工作。似乎 PHP 是一种广泛使用的带有 JQM 的服务器端语言,但我似乎找不到任何具有良好 ol' CLASP 的东西(我知道它是旧技术,但它与 PHP 的相似之处非常有趣)。我在经典 asp 方面有着悠久的历史,并且希望使用它而不是学习 PHP(如果我避免的话)。

以下是详细信息...

我有一个现有的 SQL 数据库(在我的服务器上),其中包含我想在 JQM 中简单列出的客户信息。这将是一个三页应用程序: Page1 - 登录(用户身份验证) Page2 - 基于与用户凭据关联的客户(在数据库中)的客户列表 Page3 - 客户详细信息 - 从 Page2 中选择的客户的详细信息

当用户提交登录表单时,应用程序会转到服务器并获取凭据。然后在 Page2 上使用这些凭据来列出具有该用户 ID 作为客户经理的客户。然后用户点击一个客户,customerID 被传递到客户详细信息页面,该页面用于从数据库中提取特定的客户数据。

我遇到的主要困难是 - 。连接 SQL server 数据库。javascript如何连接到服务器端并检索数据?AJAX、JSON、网络服务?. 如何在页面之间传递数据?从登录表单、客户 ID 到客户详细信息页面的凭据。

我的偏好是使用 ASP,通过 AJAX/JSON 调用来填充服务器端数据,但我不知道从哪里开始。任何帮助将不胜感激。我很乐意在我的博客上给任何能给出详细解释的人提供一些广告空间。

谢谢史蒂文w: http: //www.stevenwoolston.com

4

1 回答 1

0

If the list of customers available to the logged-in user is not too large to make the download of a complete list unbearable, you may wish to generate a complete list server side and serve them all to the client as a UL LI list, wrapped within a JQM Search Form.

JQM will then provide the end user with a nice scrollable list with a simple search form at the top that will allow them to filter the list, without any client-server interaction, negating the need for you to provide JSON data.

The code for your "page 2" would therefor be something like this:

<html>
 <head>
  <title>Customers</title>
 </head>
 <body>
  <div data-role="page" id="home" data-add-back-btn="true">
   <div data-role="header" data-theme="">
    <h1>Customers</h1>
   </div>
   <div data-role="content">    
    <form role="search"></form>
    <ul data-filter-theme="b" data-filter-placeholder="Search Customers..." data-filter="true" data-role="listview">
     <li><a href="customerDetail.asp?CustomerID=1">Customer 1</a></li>
     <li><a href="customerDetail.asp?CustomerID=2">Customer 2</a></li>
     <li><a href="customerDetail.asp?CustomerID=3">Customer 3</a></li>
    </ul>
   </div>
  </div>
 </body>
</html>

Your "page 3", in the above example is the "customerDetail.asp" page, being provided with the CustomerID in the querystring, which you can access via

request.queryString("customerID")
于 2012-09-18T08:28:25.730 回答