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 language="javascript" type="text/javascript" src="js/jquery-1.2.6-vsdoc-cn.js"></script>
<script language="javascript" type="text/javascript" >
$("#lbl_count").load("Handler.ashx", { "resultType": "text" });
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="lbl_count" runat="server"></asp:Label>
</form>
</body>
</html>Handler.ashx(默认的没有改变)
<%@ WebHandler Language="C#" Class="Handler" %>using System;
using System.Web;public class Handler : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable {
get {
return false;
}
}}怎么没有输出“Hello World”呢
<%@ 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 language="javascript" type="text/javascript" src="js/jquery-1.2.6-vsdoc-cn.js"></script>
<script language="javascript" type="text/javascript" >
$("#lbl_count").load("Handler.ashx", { "resultType": "text" });
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="lbl_count" runat="server"></asp:Label>
</form>
</body>
</html>Handler.ashx(默认的没有改变)
<%@ WebHandler Language="C#" Class="Handler" %>using System;
using System.Web;public class Handler : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable {
get {
return false;
}
}}怎么没有输出“Hello World”呢
解决方案 »
- wince 父窗体关闭子窗体的问题
- 怎么避免不同的javascript linlk之间的干扰
- 在程序中用qq邮箱发邮件(该邮箱支持smtp,且发送邮件的数量没有超过限制的数量),出现“命令顺序不正确。 服务器响应为: Error: need EHLO and AUTH first !”
- asp.net 调用外部进程
- 可以在Global.asax中替换每个输出页面中一段内容吗?
- 请问这个带参数的SQL语句哪儿有问题?
- 求一个功能
- 谁给个vs.ner2003中文版下载地址?3cd的那种
- 80分求一个关于Iframe的问题,请教高手~!~!
- DataGrid雙擊問題!等待.....
- 有人能解决这问题吗?
- 急!安装SQL后没有服务!
$(document).ready(function() {
$("#<%=lbl_count.ClientID %>").load("GetSessionHandler.ashx", { "resultType": "text" });
});