自定义复合Web控件
2006-03-23 17:11
267 查看
自定义复合的控件,如果Winform中的控件一样
1:需要单独为其建一个项目,生成的文件以.dll为后缀名
2:使用的时候,添加引用,或者在工具箱中添加
3:如果自己手动添加则:在HTML头添加注册
<%@ Register TagPrefix="Custom" NameSpace="webcustomercontrol1" Assembly="webcustomercontrol1"%>
NameSpace 是控件的命名空间,Assembley是生成的程序集的名称,就是dll文件名.
4在form中<custom 类名 runat="server"/>
下面举几个例子详细说明:
第一个例子的效果图是这样:
点击加的按钮时计算文本框中数字和,数字与数字之间以回车分隔
1using System;
2using System.Web.UI;
3using System.Web.UI.WebControls;
4using System.ComponentModel;
5
6namespace csMathControl
7
<%@ Register TagPrefix="Custom" NameSpace="csMathControl" Assembly="csMathControl"%><%@ Register TagPrefix="Custom" NameSpace="csMathControl" Assembly="csMathControl"%><%@ Register TagPrefix="Custom" NameSpace="csMathControl" Assembly="csMathControl"%><%@ Register TagPrefix="Custom" NameSpace="csMathControl" Assembly="csMathControl"%>
相关文章推荐
- asp.net 2.0 自定义个性化的web复合控件,负两案例
- 自定义个性化的web复合控件
- 在自定义WebUserControl中访问PAGE/master/或其它控件中的对象
- ASP.NET 自定义WEB控件:DropDownList改进版
- 利用 ASP.NET 2.0 创建自定义 Web 控件
- Android高级UI之自定义复合控件--标题栏
- 在SharePoint中使用自定义的服务器控件(Web Control)
- ASP.NET自定义Web服务器控件-DropDownList/Select下拉列表控件
- Asp.net Web Crop Image Control asp.net控件和jquery 自定义的一个截图控件
- 给web用户控件自定义后台事件
- 自定义Web控件写事件
- 第二章 .Net 控件开发(WebForm) 开发自定义复合控件(2) 重写属性和方法
- 自定义Web DataGrid 翻页控件
- 资源文件打包到Web自定义控件中应用
- ASP.NET基础教程-Web 自定义控件的使用-在页面上根据控件自定义属性的值在页面上连续输出文本
- 自定义服务器控件(扩展现有 Web 控件)
- 自定义IE Web 控件的SystemImagesPath
- asp.net web页面自定义分页控件
- [转]在WEB自定义控件中实现事件及自动保存值
- 大量的使用用户自定义控件对web性能有什么影响?