Chinaunix首页 | 论坛 | 博客
  • 博客访问: 69430
  • 博文数量: 65
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 658
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-10 13:01
文章分类
文章存档

2011年(1)

2009年(64)

我的朋友

分类: 系统运维

2009-06-15 16:01:35

很多时候,我们需要用到User Control,将部份UI或业务逻辑包装,下面将UserControl包装成Asp.Net ajax 控件:
简单示例:

  (ASCX) 这一段代码就不解释了:

1
2
3
4
12

5LoginName:
6td>
7

8asp:TextBox>
9td>
10tr>
11

13Password:
14td>
15

16asp:TextBox>
17td>
18tr>
19table>

  (LoginPanel.js)

1
2///
3Type.registerNamespace("CsharpFarmer");
4CsharpFarmer.LoginPanel=function(element){
5CsharpFarmer.LoginPanel.initializeBase(this,[element]);
6this.userName=null;
7this.password=null;
阅读(282) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~