具有新控件的asp.net工具包 [英] asp.net tool kit with new controls

查看:48
本文介绍了具有新控件的asp.net工具包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我们的项目中,我们使用具有不同验证的多个文本框.

例子
仅包含数字的textbox1
具有alpha数值的textbox2
具有电子邮件验证功能的te​​xtbox3
具有日期验证和日期选择器的textbox4.


我想在bulit中开发具有不同验证功能的控件.
如果我只需要带有数字的文本框,则可以将其拖放到我的应用程序中

任何人都可以引导我.


谢谢
karthik

Hi every one,

in our project we are using multiple text boxes with different validations.

example
textbox1 with only numerics
textbox2 with alpha numeric
textbox3 with email validation
textbox4 with date validation and date picker.


i want to devlep controls with different validation in bulit .
if i need only textbox with numerics i can drag and drop in to my application

any one guide me in this .


thanks
karthik

推荐答案

通常,通过从TextBox继承并覆盖TextBox的OnKeyPress方法,可以防止在TextBox中输入任何键. 仅接受数字的文本框 [ CompositeControl [ ^ ]或 CustomControl [
Usually you can prevent any keys from being entered in a TextBox by Inheriting from a TextBox and overriding the OnKeyPress Method of a TextBox. Text box to accept only number[^] there is an example. Any other validation would work more or less the same.
For more advanced TextBoxes you might have to create a CompositeControl[^] or a CustomControl[^]. This can be quite a difficult and daunting task though.


这篇关于具有新控件的asp.net工具包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆