易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET基于JQUERY的AJAX的验证登录(JSON)

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default"%>
<!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 runat="server">
    <title>主页</title>
   <script src="js/jquery-1.2.6.js" type="text/javascript"></script>
<script src="js/thickbox.js" type="text/javascript"></script>
<link type="text/css"  href="css/thickbox.css" rel="Stylesheet" />
</head>
<body>
<form id="form1" runat="server">
    <div style="margin-left:auto; margin-right:auto;width:400px;">
    <a href="ajaxLogin.html?height=120&width=250&modal=false" class="thickbox" title="请登录">
    我要进行JQUERY登录验证</a>
    <br />
    账号:admin<br/>
    密码:admin<br />
    </div>
   
</form>
</body>
</html>
login.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>
<!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 runat="server">
    <title>登录验证</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
  
    </div>
    </form>
</body>
</html>
login.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.We


相关文档:

ASP.NET后台代码调用前台javascript脚本的方法

很多人都向在服务器端调用客户端的函数来操作,也就是在asp中调用javascript脚本中已经定义好的脚本函数。经过研究,发现了一些勉强的方法。
1. 用Response.Write方法写入脚本
比如在你单击按钮后,先操作数据库,完了后显示已经完成,可以在最后想调用的地方写上
Response.Write("<script type='text/javascrip ......

ajax 安全性

完全适用ASP.NET的认证机制
–可以使用FormsAuthentication
•WebService方法可以操作Cookie
–Impersonation
–PrincipalPermission
WebService7.cs Code
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
usi ......

Ajax 客户端代理的作用

客户端代理的作用
在对象里做了一个标记
–“__type” = “ComplexType.Color”
服务器端根据标记选择反序列化的目标类型
可出现“多态”效果
Employee.cs Code:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Secu ......

Ajax入门例子

  //创建XMLHttpRequest对象,需要根据IE和浏览器类型创建不同的xhr对象
var xhrobj;
function check()
{
//获取文本框的值
var username = document.getElementById("username").value;
if(window.XMLHttpRequest)
{
//针对firefox,Mozilla,ie7,ie8等
xhrobj = new XMLHttpRequest();
/ ......

asp.net 2.0 怎样对label进行绑定

问题描述:
数据库A表中:
ID    Name
1    小明
2    小强
3    小张
4    小李
5    小关
...
分别有Label1,Label2... Label5 五个标签,怎么让这五个标签Text绑定显示A表Name列的前5个,就是说Label1显示小明,Label2显示小强... 
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号