//-------------------------------------加入脚本库到根目录
498)this.width=498;'' onmousewheel = ''javascript:return big(this)'' border="0" alt="" width="179" height="135" src="http://images.myeducs.cn/files/uploadimg/20120227/1016222.png" />
//-----------------------------------页面开发
html结构
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Web.WebForm1" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>model加载和数据更新</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <script type="text/javascript" src="Scripts/jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="Scripts/Qin.Engine.js"></script
- <script>
- var pID=-1;
- $(function () {
- Qin_LoadDataToDom2("Web.UserInfoAction", "GetUserInfo", {}, "form_UserInfo",function(data){
- alert(data.A);
- pID=data.A;
- });
- });
- function AjaxUpdateUserInfo() {
- var ID =pID;
- _TableName="PersonSet";
- Qin_AjaxUpdate("Web.UserInfoAction", "AjaxUpdateUserInfo", "form_UserInfo", "ID", ID, { }, function (data) {
- alert("主键为"+data+" update success");
- });
- }
- </script>
- </head>
- <body>
- <form id="form_UserInfo" >
- <input id="keyID" class="Key" field="ID" type="hidden" />
- <table style="width: 100%;">
- <tr>
- <td>
- 姓名:
- </td>
- <td>
- <input field="UserName" type="text" />
- </td>
- </tr>
- <tr>
- <td>
- 性别
- </td>
- <td>
- <input name="Sex" field="Sex" value="true" type="radio" />男<input name="Sex" field="Sex"
- value="false" type="radio" />女
- </td>
- </tr>
- <tr>
- <td>
- 年龄
- </td>
- <td>
- <input field="Age" type="text" />
- </td>
- </tr>
- <tr>
- <td>
- 北京户口
- </td>
- <td>
- <input field="IsBeiJing" type="checkbox" />
- </td>
- </tr>
- <tr>
- <td>
- 年龄段
- </td>
- <td>
- <select field="AgePeriod"><option value="1">老年人</option><option value="2">中年人</option><option value="3">年轻人</option></select>
- </td>
- </tr>
- </table>
- <input type="button" onclick="AjaxUpdateUserInfo();" value="更新用户数据" />
- </form>
- </body>
- </html>
两