惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recorded Future
Recorded Future
S
Secure Thoughts
D
Docker
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
F
Fortinet All Blogs
月光博客
月光博客
S
Security @ Cisco Blogs
AI
AI
IT之家
IT之家
P
Proofpoint News Feed
Stack Overflow Blog
Stack Overflow Blog
大猫的无限游戏
大猫的无限游戏
N
News and Events Feed by Topic
Hacker News: Ask HN
Hacker News: Ask HN
人人都是产品经理
人人都是产品经理
Recent Announcements
Recent Announcements
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Google Online Security Blog
Google Online Security Blog
K
Kaspersky official blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
Latest news
Latest news
Webroot Blog
Webroot Blog
GbyAI
GbyAI
L
Lohrmann on Cybersecurity
T
Threat Research - Cisco Blogs
S
Schneier on Security
G
Google Developers Blog
N
News | PayPal Newsroom
C
Check Point Blog
T
Tenable Blog
L
LINUX DO - 最新话题
C
CERT Recently Published Vulnerability Notes
T
Troy Hunt's Blog
Know Your Adversary
Know Your Adversary
SecWiki News
SecWiki News
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
爱范儿
爱范儿
W
WeLiveSecurity
Project Zero
Project Zero
M
MIT News - Artificial intelligence
H
Hacker News: Front Page
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - jiekengxu

工厂方法模式(Factory Method Pattern) 生成器模式(Builder) 抽象工厂模式(Abstract Factory Pattern) asp.net 2.0 权限树的控制(多处转载) 中小型项目的权限管理的数据关系图 简陋的会计凭证金额输入控件(再加强) Web Services Enhancements 3.0 Quick Start(四) 初识HTC asp.net 2.0 缓存(页面输出缓存) asp.net 2.0 缓存(理论篇) 智能客户端概述 Web Services Enhancements 3.0 Quick Start(三) 简陋的会计凭证金额输入控件(加强) Web Services Enhancements 3.0 Quick Start(二) Web Services Enhancements 3.0 Quick Start(一) 利用AJAX.net设计现在执行运算的报表 单件模式在报表中的使用 Web Service Software Factory 构架 Web Service Software Factory 入门
简陋的会计凭证金额输入控件
jiekengxu · 2006-10-26 · via 博客园 - jiekengxu

今天看到金碟的会计凭证,看到了它很人性化的金额输入框,突然兴起也想玩个,就做了这么简陋的一个.
不过这也是我第一个自定义控件,以后慢慢的完善它,达到有用的程度
其实很简单.先把代码贴出来,再介绍代码的说明

using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Voucher
{
    [DefaultProperty(
"jText")]
    [ToolboxData(
@"<{0}:VoucherInput jText = '000'  
    runat='server'></{0}:VoucherInput>
")
    ]
    
public class VoucherInput : WebControl, INamingContainer
    
{
      
        
private TextBox _TextBox;

        
属性 Properties delegated to child controls

        
方法 Overriden methods

    }

}

一、添加引用
      using System.Web.UI; 
      using System.Web.UI.WebControls;
二、设置默认的属性和默认的标志
      [DefaultProperty("jText")]
      [ToolboxData(@"<{0}:VoucherInput jText = '0.00' runat='server'>") ]
      他们在asp.net的设计页面上就等于<cc1:VoucherInput ID="VoucherInput1" runat="server" jText="0.00" />
三、设置TextBox的属性
      背景图片、最大字符等等
四、输出javascrip脚本,控制文本框只能输入数字和小数点
五、界面如下

总结
这个还是有很大的问题,还远远打不到金碟的水平,不过这个也是我第一个自定义控件,我会不断的升级,如果真的能和金蝶做的一样,会马上发布的。