Comet:Jquery+asp.net实现http长连接(LongPoll)
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="JqueryAjaxLongPoll.aspx.cs" Inherits="JqueryAjaxLongPoll" %>
<!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 type="text/javascript" src="script/jquery-1.2.6.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#Button1").bind("click",{btn:$("#Button1")},function(evdata){
$.ajax({
type:"POST",
url:"JqueryAjaxLongPoll.aspx",
dataType:"json",
timeout:10000,
data:{ajax:"1",time:"10000"},
success:function(data,textStatus){
//alert("ok!");
 
相关文档:
ViewResult:一般呈现某个aspx文件,由View方法返回。
RedirectToResult:使浏览器重定向,由Redirect方法返回。
RedirectToRouteResult:直接交给下一个Action,由RedirectToAction方法返回。 ......
断点续传的原理
在了解HTTP断点续传的原理之前,先来说说HTTP协议,HTTP协议是一种基于tcp的简单协议,分为请求和回复两种。请求协议是由客户机(浏览器)向服务器(WEB SERVER)提交请求时发送报文的协议。回复协议是由服务器(web server),向客户机(浏览器)回复报文时的协议。请求和回复协议都由头和体组成。头和体之 ......
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Text;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Sy ......
web.config
<customErrors mode="On" defaultRedirect="ApplicationErroy.aspx" >
<error statusCode="403" redirect="403.htm"/>
<error statusCode="404" redirect="404.htm"/>
<error statusCode= ......