All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
为Linux和Windows安装PHP和Oracle_php资料_编程技术
使用MS,SQL7的LINKED,SERVER第二篇_mssql学习_编程技术
ASP.NET上传文件面面观_[Asp.Net教程]
提高SQL,Server安全性的一些建议_mssql学习_编程技术
编程使用资源文件实现多语言页面
正则表达式中的组集合的使用_.net资料_编程技术
C#教程:MouseClick和MouseDoubleClick事件使用实例
ASP.NET底层架构之从浏览器到ASP.NET_.net资料_编程技术
序列化和反序列化XML应用程序设置类_[Asp.Net教程]
在ASP.NET,Atlas中调用Web,Service_[Asp.Net教程]
Reading number is top 10 pictures
乳娘帕梅拉安德森3
美丽的桂林风光1
NeedWallpaper12
一个武林高手的故事
这是男生笨么?
擦地板的大叔太好了
Kim jong il's mistress, national beauty JinYuJi actor2
In the world the most mysterious 21 place landscape4
穷哥们向美女求婚攻略
The money of more than 100 countries and regions21
Download software ranking
Eclipse 4.2.2 For Win32
Dance with duck(male prostitution)
Boxer vs Yellow5
Take off clothes to survival
Jinling thirteen stock
塘西风月痕
实战黑客不求人
豪门浪荡史
Sora aoi, the nurse, uniform ,nursing assistant
Eclipse 4.2.2 For Win64
aaa published in(发表于) 2013/12/8 7:48:39 Edit(编辑)
asp.net,ajax,1.0,hello,world程序_.net资料_编程技术

asp.net,ajax,1.0,hello,world程序_.net资料_编程技术

asp.net ajax 1.0,hello world程序_.net资料_编程技术-你的首页-uuhomepage.com







asp.net ajax跟atlas有了很大不同。从这个简单的例子中可以看出几点。
<1>新建一个asp.net ajax-enabled web site
<2>页面布局。Server Controls的标签前缀(Tag Prefix)由atlas变为asp;




<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="HelloWorld" %>
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


Hello











你的名字:












<3>客户端脚本。调用服务的方法有些许改变。可以指定默认的回调方法。




<4>HelloWorldService服务代码。为了能使服务被asp.net ajax客户端调用,必须给服务指明[ScriptService]属性(为了使用这一属性,需要引用Microsoft.Web.Script.Services命名空间)。
1using System;
2using System.Web.Services;
3using System.Web.Services.Protocols;
4using Microsoft.Web.Script.Services;
5
6[WebService(Namespace = "http://tempuri.org/")]
7[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
8[ScriptService]
9public class HelloWorldService : System.Web.Services.WebService {
10
11 public HelloWorldService () {
12
13 //Uncomment the following line if using designed components
14 //InitializeComponent();
15 }
16
17 [WebMethod]
18 public string HelloWorld(string name) {
19 string hello = String.IsNullOrEmpty(name) ? "无名氏" : name;
20 hello += "你好,当前服务器时间是:";
21 hello += DateTime.Now.ToUniversalTime();
22 return hello;
23 }
24
25}



























添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.