Click here to Skip to main content
Rate this: bad
good
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
thanksss
Posted 3-Oct-13 21:00pm
Edited 3-Oct-13 21:18pm
v2
Comments
Rohan Leuva at 4-Oct-13 2:07am
   
Check the Framework you are using. It should .NET 4.5 .

1 solution

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

Solution 2

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,
 

Smile | :)
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 7,215
1 DamithSL 5,114
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,747
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 4 Oct 2013
Copyright © CodeProject, 1999-2014
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