易截截图软件、单文件、免安装、纯绿色、仅160KB

设置自定义ASP.NET服务器控件TagPrefix的几种方法

这两天看《道不远人-----深入解析ASP.NET2.0控件开发》这本书,看完第二章内容后,想总结下“设置自定义ASP.NET服务器控件TagPrefix的几种方法”,以便以后查阅,以下面code编写的控件为例,由于重点不是控件编写,所以写了个非常简单的控件,姑且叫它EmailInput
Code
 1using System;
 2using System.Collections.Generic;
 3using System.ComponentModel;
 4using System.Text;
 5using System.Web;
 6using System.Web.UI;
 7using System.Web.UI.WebControls;
 8
 9namespace ServerControl
10{
11    [ToolboxData("<{0}:EmailInput runat=server></{0}:EmailInput>")]
12    public class EmailInput : CompositeControl
13    {
14        protected RegularExpressionValidator _regValidator;
15        protected RequiredFieldValidator _rqrValidatator;
16        protected TextBox _input;
17        protected override HtmlTextWriterTag TagKey
18        {
19            get
20            {
21                return HtmlTextWriterTag.Div;
22            }
23        }
24        protected override void CreateChildControls() 
25        {
26            Controls.Clear();
27       


相关文档:

ASP.NET Cookies简单应用 记住用户名和密码

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace TLibrary.ObjectHelper
{
    public class CookiesHelper
    {
        #region  ......

ASP.NET中让图片以二进制的形式存储在数据库中


 今早有个网友问到我这问题,以前我都是直接在数据库中存文件名的,还没有试过存储整张图片到数据库中,上网搜索了一下,自己又测试了一番,代码如下:
建立保存图片的表的SQL语句:
 
Sql代码 < width="14" height="15" src="javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://w ......

asp.net 验证正则表达式收藏

整数或者小数:^[0-9]+\.{0,1}[0-9]{0,2}$
只能输入数字:"^[0-9]*$"。
只能输入n位的数字:"^\d{n}$"。
只能输入至少n位的数字:"^\d{n,}$"。
只能输入m~n位的数字:。"^\d{m,n}$"
只能输入零和非零开头的数字:"^(0|[1-9][0-9]*)$"。
只能输入有两位小数的正实数:"^[0-9]+(.[0-9]{2})?$"。
只能输入有1~3位小数的 ......

在ASP.NET中使用FCKeditor的方法

之前用的在线编辑器是DotNetTextBox ,并且曾一度觉得它异常强大,如可以给上传的图片加文字水印或者图片水印,但后来发现其上传的图片不容易管理,都挤在一个文件夹里面(免费版,付费版好像可以分文件夹上传保存图片),并且段首空格总不是所见即所得,我编辑时空了两个字符的位置,到了前台页面的时候只有一个字符,所以 ......

ASP.NET的默认调用后台函数

以下是系统自动生成的回调函数
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
    theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.ons ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号