asp.net中文本框的文本模式属性 [英] Text mode property of Text box in asp.net

查看:162
本文介绍了asp.net中文本框的文本模式属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好伙伴

我有文字框

出生日期

手机号码。我正在使用的DateofBirth的文本框textmode属性日期和

对于手机号码我正在使用textmode属性=数字。但它显示运行时错误



描述:解析过程中出错服务此请求所需的资源。请查看以下特定的解析错误详细信息并相应地修改源文件。



解析器错误消息:无法从TextMode属性的字符串表示Number创建System.Web.UI.WebControls.TextBoxMode类型的对象。



任何人都可以帮助我。如何使用这个属性

thanksss

Hi guyss
I have text boxes
for Date of Birth
Mobile No.The text box textmode property for DateofBirth i am using Date and
For mobile number i am using textmode property=Number .but it show runtime error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Cannot create an object of type 'System.Web.UI.WebControls.TextBoxMode' from its string representation 'Number' for the 'TextMode' property.

Can anybody help me .how to use this property
thanksss

推荐答案

在asp.net Frameword 4.0或更低版本中,



Textbox具有Textmode属性,对用户非常有用。



目前Textmode属性只能设置为以下3个选项。



密码:如果您可以选择此模式想要将文本框中的输入显示为点(密码类型)。



单行:用于将文本框保留为单行字段。



多行:用于将文本框设为评论框,即有多行...







HOpe这将有助于...



错误你menti上面的oned只是因为这个原因因为你试图把textmode那些不受支持的值。





如果你想要的话对日期或数字的文本框进行验证,



您可以使用AjaxMaskExtender或FilteredTextBoxExtenders,





:)
In asp.net Frameword 4.0 or less,

Textbox have Textmode property which is very helpful for the user.

Currently Textmode property can only be set to following 3 options.

Password: This mode can be selected if you want to show the input in textbox as dot's (Password type).

Single Line: Use to retain the textbox as single line field.

Multiline: Use to make textbox as commentbox , i.e to have multiple lines...



HOpe this will help...

as error you mentioned above is only because of this reason coz you are trying to put textmode those values which are not supported.


Further if you want to do the validation on textboxes for Date or for Numbers,

You can use AjaxMaskExtender or FilteredTextBoxExtenders,


:)


这篇关于asp.net中文本框的文本模式属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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