My Happy Ending,Grip Time Study Hard to be an excellent network engineer,My Happy will start
博客园
首页
新随笔
联系
订阅
管理
随笔 - 77 文章 - 479 评论 - 78 trackbacks - 2
<
2012年2月
>
日
一
二
三
四
五
六
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
1
2
3
4
5
6
7
8
9
10
搜索
最新随笔
1. 我的Google Adsense帐户被关
2. [F5]功能演示 HTML/CSS实时调试器并兼容所有游览器,网页设计人员幸福了。
3. 研究生,在职研究生,MBA,EMBA,高层工商管理硕士,总裁研修班问题解答
4. 超屌超搞笑的B-BOX街舞表演
5. 一头感动了全中国的“猪”!感动了全世界!泪奔
6. 台湾2010年最感人的广告-母亲的勇气
7. 中国价
8. 搞笑 哈哈
9. 东莞扫黄淡水“得福”?深圳客捧热特殊桑拿 101004 晚报10点半
10. 小孩看管犯人超搞笑
我的标签
javascript
(3)
ASP.NET 大文件 上传
(2)
frames 窗体 刷新
(1)
LightBox
(1)
内容显示
(1)
ASP.NET
(1)
Visual Studio
(1)
.NET
(1)
Atlas
(1)
Community News
(1)
更多
随笔分类
SQL2005
随笔档案
(77)
2011年9月 (3)
2010年12月 (3)
2010年10月 (4)
2010年6月 (1)
2009年11月 (1)
2009年4月 (1)
2008年12月 (3)
2008年11月 (6)
2008年10月 (5)
2008年9月 (2)
2008年8月 (1)
2008年7月 (1)
2008年5月 (3)
2008年4月 (7)
2008年3月 (9)
2008年1月 (3)
2007年12月 (2)
2007年11月 (1)
2007年10月 (1)
2007年9月 (3)
2007年7月 (1)
2007年6月 (1)
2007年5月 (6)
2007年4月 (2)
2007年3月 (2)
2006年12月 (2)
2006年11月 (2)
2006年10月 (1)
文章分类
(483)
AJAX(19)
AJAX.NET控件(27)
ASP.NET初级程序(131)
ASP.NET错误解决(4)
ASP.NET高级程序 (121)
ASP程序代码(32)
C# 2.0(3)
C# 线程(1)
Expression Studio(1)
JavaScript(34)
Jquery (8)
Linq(1)
NHibernate(2)
Oracle
Silverlight(13)
SQL2005(4)
UML建模(1)
VB.NET(1)
Web Service(2)
WinForm(5)
保密信息(5)
常用代码(2)
常用控件+DLL(5)
电脑技巧(1)
金融知识(3)
美术美工学习(5)
情感文章(1)
软件测试(3)
数据库技术(40)
娱乐(笑话)(8)
最新评论
阅读排行榜
评论排行榜
推荐排行榜
AJAX控件之DynamicPopulate 重难点之
效果图片:
加载完毕 正在加载中.....
资源文件
Css代码
body
{
}
.DPENormal
{
border:silver 1px inset;
padding:2px;
text
-
align:center;
height:2em;
width:200px;
margin:5px;
}
.DPEUpdating
{
background
-
image:url(images
/
loading.gif);
background
-
position:center;
background
-
repeat:repeat;
border:silver 1px inset;
padding :2px;
text
-
align :center;
height:2em;
width:200px;
margin:5px;
}
显示页面的Html代码(里面含有深奥的JavaScript)
<%
@ Page Language
=
"
C#
"
AutoEventWireup
=
"
true
"
CodeFile
=
"
Default.aspx.cs
"
Inherits
=
"
_Default
"
%>
<%
@ Register Assembly
=
"
AjaxControlToolkit
"
Namespace
=
"
AjaxControlToolkit
"
TagPrefix
=
"
cc1
"
%>
<!
DOCTYPE html PUBLIC
"
-//W3C//DTD XHTML 1.1//EN
"
"
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
"
>
<
html xmlns
=
"
http://www.w3.org/1999/xhtml
"
>
<
head runat
=
"
server
"
>
<
title
>
AJAX控件之DynamicPopulate
</
title
>
<
link href
=
"
StyleSheet.css
"
rel
=
"
stylesheet
"
type
=
"
text/css
"
/>
</
head
>
<
body style
=
"
text-align: center
"
>
<
form id
=
"
form1
"
runat
=
"
server
"
>
<
asp:ScriptManager ID
=
"
ScriptManager1
"
runat
=
"
server
"
/>
<
script type
=
"
text/javascript
"
language
=
"
javascript
"
>
function updateDateKey(value)
{
var behavior
=
$find(
'
dpe
'
);
if
(behavior)
{
behavior.populate(value);
}
}
Sys.Application.add_load(function()
{updateDateKey(
'
N
'
);}
);
</
script
>
<
div
>
<
input id
=
"
Normal
"
checked
=
"
checked
"
name
=
"
DateGroup
"
type
=
"
radio
"
value
=
"
N
"
onclick
=
"
updateDateKey(this.value);
"
/>
普通型
<
br
/>
<
input id
=
"
ShortDate
"
name
=
"
DateGroup
"
type
=
"
radio
"
value
=
"
S
"
onclick
=
"
updateDateKey(this.value);
"
/>
短日期
<
br
/>
<
input id
=
"
LongDate
"
name
=
"
DateGroup
"
type
=
"
radio
"
value
=
"
L
"
onclick
=
"
updateDateKey(this.value);
"
/>
长日期
<
br
/>
<
br
/>
<
asp:Panel ID
=
"
Panel1
"
runat
=
"
server
"
Height
=
"
104px
"
Width
=
"
280px
"
CssClass
=
"
DPENormal
"
>
</
asp:Panel
>
</
div
>
<
cc1:DynamicPopulateExtender ID
=
"
dpe
"
runat
=
"
server
"
TargetControlID
=
"
Panel1
"
UpdatingCssClass
=
"
DPEUpdating
"
ServiceMethod
=
"
GetGroupDate
"
>
</
cc1:DynamicPopulateExtender
>
</
form
>
</
body
>
</
html
>
显示页面的CS代码:(这里要在绑定了DynamicPopulate的Panel中设置里面的serviceMethod中设置GetGroupDate方法)
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
_Default : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public
static
string
GetGroupDate(
string
contextKey)
{
System.Threading.Thread.Sleep(
1000
);
string
value;
if
(contextKey
==
"
N
"
)
{
value
=
DateTime.UtcNow.ToString();
}
else
if
(contextKey
==
"
S
"
)
{
value
=
DateTime.Now.ToShortDateString();
}
else
{
value
=
DateTime.Now.ToLongDateString();
}
return
value;
}
}
绿色通道:
好文要顶
关注我
收藏该文
与我联系
posted on 2007-04-01 00:25
小角色
阅读(364)
评论(1)
编辑
收藏
FeedBack:
1562179
#1楼
2009-06-19 08:32
憤怒的人[未注册用户]
Web Service call failed: 12030
這是為么?
回复
引用
注册用户登录后才能发表评论,请
登录
或
注册
,
返回博客园首页
。
首页
博问
闪存
新闻
园子
招聘
知识库
最新IT新闻
:
·
iPad应用的10大用户体验设计准则
·
苹果测试8寸屏平板电脑
·
即时通信集成服务IM+获1000万美元投资
·
未来医疗让我们身体变成 API
·
大数据时代
»
更多新闻...
最新知识库文章
:
·
如何学习编程
·
学编程关键在动手,提高在实践
·
十年程序员
·
HTTP 协议详解
·
像设计Web程序那样设计建筑
»
更多知识库文章...
China-pub 2011秋季教材巡展
China-Pub 计算机绝版图书按需印刷服务