Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Using Multineline textbox & applied validation throgh code behind on multiline text box.
C#
s1 = @"(\d+";
       s2 = @")*\d+";

       string regx = s1 + Functions.ToString(ConfigurationManager.AppSettings["BulkCaseSeparator"].ToString() + s2);

       Regex.Match("example", @".*\n", RegexOptions.Multiline);

       RegularExpressionValidator1.ValidationExpression = regx;




above code is use for apply validation. all validation are working fine passing input in multiline textbox like
1213,1415 it is working fine
but when pass input like
1415,1617,
1819,
1920,
1415 not working how apply changes in code so this regular expression working on next line also.
Posted
Comments
Ed Nutting 19-Apr-12 3:33am    
Please research regular expressions on Google. Five minutes research of regular expressions and flags would tell you how to do multiline parsing.

Thanks,
Ed

1 solution

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900