感谢 whw123456 帮我解决ajax的问题!这里是我的代码,希望对大家有帮助。
webconfig中加:
<system.web>
<httpHandlers>
<add verb= "* " path= "*.ashx " type= "AjaxPro.AjaxHandlerFactory,AjaxPro.2 "/>
</httpHandlers>
</system.web>
————————————————————————————————
ajax_show.aspx.cx 代码:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ajax_show : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(ajax_show));
}
[AjaxPro.AjaxMethod]
public DateTime GetServerTime()
{
return DateTime.Now;
}
[AjaxPro.AjaxMethod]
public int AddTwo(int firstInt, int secondInt)
{
return firstInt + secondInt;
}
}
————————————————————————
ajax_show.aspx 代码:
<%@ Page Language= "C# " AutoEventWireup= "true " CodeFile= "ajax_show.aspx.cs " Inherits= "ajax_show " %>
<!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>
<input id= "Button1 " type= "button " value= "获得服务器时间 "
onclick= "getServerTime(); " />
<input id= "Text1 " type= "text " />
<input id= "Text2 " type= "text " />
<input id= "Button2 " type= "button " value= "得到两个文本框的和
webconfig中加:
<system.web>
<httpHandlers>
<add verb= "* " path= "*.ashx " type= "AjaxPro.AjaxHandlerFactory,AjaxPro.2 "/>
</httpHandlers>
</system.web>
————————————————————————————————
ajax_show.aspx.cx 代码:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ajax_show : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(ajax_show));
}
[AjaxPro.AjaxMethod]
public DateTime GetServerTime()
{
return DateTime.Now;
}
[AjaxPro.AjaxMethod]
public int AddTwo(int firstInt, int secondInt)
{
return firstInt + secondInt;
}
}
————————————————————————
ajax_show.aspx 代码:
<%@ Page Language= "C# " AutoEventWireup= "true " CodeFile= "ajax_show.aspx.cs " Inherits= "ajax_show " %>
<!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>
<input id= "Button1 " type= "button " value= "获得服务器时间 "
onclick= "getServerTime(); " />
<input id= "Text1 " type= "text " />
<input id= "Text2 " type= "text " />
<input id= "Button2 " type= "button " value= "得到两个文本框的和
相关推荐
Linksys whw03 V2升级固件,用于linksys升级使用,适合有一定基础和动手能力的人员使用,来自linsys官网下载
利用这两个文件可以方便的实现vc显示gif图片
In this paper,we obtain the strong assymptotic values of n-width d(W'Hw),C)and d(W'H",L) for non-periodic function class W'Ha,wheve w is a concave modulus of continuity.
定 义 定义: 计算机病毒是指编制、或者在计算机程序中 插入的,破坏计算机功能或毁坏数据,影响计算机使用并能自我复制的一组计算机指令或程序代码 广义: 能够引起 计算机故障,破坏计算机数据的程序
本文实例为大家分享了JavaScript实现飞舞泡泡效果的具体代码,供大家参考,具体内容如下 示例 CSS html, body { margin: 0; padding: 0; width: 100%; height: 100%; } canvas { position: fixed; width: ...
TJ2R3-WHW22-B848T-B78YJ-见下载的文档吧... Microsoft Expression Design 2 TJ2R3-WHW22-B848T-见下载的文档吧-HHJWJ Microsoft Expression Web 2 GFF4B-G4JJ8-HXRPX-RV4VQ-8CV9W come from internet ,share ...
跟软件是转化视频软件视频文件制作 AVI是目前便携式媒体播放器中最为流行的视频格式,也是网络上流传较多的格式之一。采用XviD/DivX格式编码的视频文件能拥有较高的视频质量,并且文件较小。...
科班小白的学习经历,自己一点一点通过学习,然后结合相关知识点,总结的学习笔记,非常适合,各种想要学习java的初学者,简单易懂的知识点能够帮助你快速学习到你想学习的!
public class Android_DateActivity extends Activity implements OnClickListener { /** Called when the activity is first created. */ private Button button; private TextView textview;...
一个不错的影像工作站。能快速查看片子,编写报告,导出保存,是专业人士的好工具。
Vudroid是一款可以阅读pdf和djvu格式文本的阅读器。可以阅读本地的pdf文件,遇到大文件时渲染有点慢。
获取手机通讯录的一个简单demo,记得在配置文件中加权限
深度学习的论文
Extent TestNG Reporter美化,动态获取testng.xml中suite的名称,报告生成在工程test-output目录下
1,接收小程序传的当前坐标进行自动定位, 2,地图点选, 3,三种策略驾车导航:最少时间、最短距离、避开高速
环境参考.rar
FudanNLP 自然语言处理github练习 task1 jupyter notebook 格式 仅供参考