C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Textbox validation in asp.net


Posted Date: 11 Mar 2008      Total Responses: 4

Posted By: LuckyIBM       Member Level: Silver     Points: 2


How to fix Minlength=5 and maxlangth is also=5
textbox holdes property Maxlength but MinLenght ? What type of Validation is reqired here.




Responses

Author: manibabu.g    11 Mar 2008Member Level: GoldRating:     Points: 2
use javascript validation's


Author: Mohan    11 Mar 2008Member Level: GoldRating:     Points: 2
you can use range validator for this.

but you need to give a minimum value=10000 and maximum value=99999


Author: victoria    11 Mar 2008Member Level: GoldRating:     Points: 2
string s=tname.text;
int lent=s.length
if((lent>5)||(lent<5))
{
response.write("not valid");
}
else
{
response.write("valid");
}


Author: Balthazor    11 Mar 2008Member Level: DiamondRating:     Points: 2
U can use javasript and if not then go for regular expression

I think you want user to enter only 5 char?

Use the following regular expression in your Validation expression

\w{5}


Post Reply
You must Sign In to post a response.
Next : difference between datagrid and grid view?
Previous : How read data from XML?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

fax server

Contact Us    Privacy Policy    Terms Of Use