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 !




regular expression validator---urgent


Posted Date: 05 Sep 2008      Total Responses: 1

Posted By: lavanya       Member Level: Gold     Points: 1


hai all
i have textbox for usrid

i want to allow text like ths
"asp(any numbers)"
how to valid expression in regular expression




Responses

Author: Arunagiri Gunasekaran    05 Sep 2008Member Level: GoldRating:     Points: 3
Dear Lavanya,

Use the below given function to validate for your requirement


<script language="javascript" type="text/javascript">
function fun_Validate()
{
var _strValue = document.getElementById('TextBox1').value;
var _strPattern= /^[a-zA-Z]+\([0-9\-]+\)$/.test(_strValue);
if(!_strPattern)
{
alert("Please give the valid input !");
return _strPattern;
}
return _strPattern;
}
</script>


All the best :)



Post Reply
You must Sign In to post a response.
Next : can anyone solve this issue?
Previous : How to send message remotely from windows mobile application to port in c#.net.
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

fax server

Contact Us    Privacy Policy    Terms Of Use