Contents tagged with C#
Download source code - 124.35 KB
What Problem Does This Solution Solve?
In another words, for any Data list or in our case Menu Control, if you notice the HTML code by viewing the source of your page what ASP.NET runtime engine generates, you may see a Table based layout, which is of course really difficult to design and not considered a good practice in … more
We can have lot of regular expressions here http://regexlib.com/DisplayPatterns.aspx?AspxAutoDetectCookieSupport=1 to validate email from client side using ASP.NET RegularExpressionValidator control. Most of them plays well. One can choose any of them based on your requirement.
Anyway, please back to my point now. we know, trimming or ignoring whitespace is a pretty common requirement, so I would be very surprised if a validation couldn't handle it. Since ASP.NET RegularExpressionValidator control can't handle trim during validate so, we need modify the regex to allow whitespace in both end.
White space is represented in regex with \s. Zero or more white spaces would be \s*. Therefore, … more