Click here to Skip to main content
12,895,911 members (47,861 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
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
Posted 3-Oct-13 20:00pm
Updated 3-Oct-13 20:18pm
Rohan Leuva 4-Oct-13 2:07am
Check the Framework you are using. It should .NET 4.5 .

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

In 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,


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 4 Oct 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100