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中调用javascript脚本中已经定义好的脚本函数。经过研究,发现了一些勉强的方法。
1. 用Response.Write方法写入脚本
比如在你单击按钮后,先操作数据库,完了后显示已经完成,可以在最后想调用的地方写上
Response.Write("<script type='text/javascrip ......
如果你已经有较多的面向对象开发经验,跳过以下这两步:
第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是一个全面向对象的技术,不懂OO,那绝对学不下去!
第二步 对.NET Framework类库有一定的了解 可以通过开发Windows Form应用程 ......
测试环境:windows server 2003+visual studio 2008
''' <summary>
''' 获取Excel文件所有工作表的名称
''' </summary>
''' <param name="iSubPath">Excel文件路径,如:D:\test.xls</param>
  ......
var XmlHttp;
var PathUrl;
function createXmlHttp() {
if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
  ......