Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to Use DropDownList in ASP.NET Pin
dwark10618-Aug-05 11:42
dwark10618-Aug-05 11:42 
GeneralRecursive method calling (is it wrong?) Pin
therealmccoy18-Aug-05 7:22
therealmccoy18-Aug-05 7:22 
GeneralRe: Recursive method calling (is it wrong?) Pin
Judah Gabriel Himango18-Aug-05 7:27
sponsorJudah Gabriel Himango18-Aug-05 7:27 
GeneralRe: Recursive method calling (is it wrong?) Pin
Dan Neely18-Aug-05 7:30
Dan Neely18-Aug-05 7:30 
GeneralRe: Recursive method calling (is it wrong?) Pin
therealmccoy18-Aug-05 18:50
therealmccoy18-Aug-05 18:50 
GeneralRegular Expression Pin
vuthaianh18-Aug-05 7:15
vuthaianh18-Aug-05 7:15 
GeneralRe: Regular Expression Pin
sgatto15918-Aug-05 8:39
sgatto15918-Aug-05 8:39 
GeneralRe: Regular Expression Pin
eggie518-Aug-05 11:01
eggie518-Aug-05 11:01 
Good find.

"
Validating Unicode Characters
Use the following code to validate Unicode characters in a page.

using System.Text.RegularExpressions;
. . .

public class WebForm1 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// Name must contain between 1 and 40 alphanumeric characters
// and (optionally) special characters such as apostrophes
// for names such as O'Dell

if (!Regex.IsMatch(Request.Form["name"],
@"^[\p{L}\p{Zs}\p{Lu}\p{Ll}\']{1,40}$"))
throw new ArgumentException("Invalid name parameter");

// Use individual regular expressions to validate other parameters
. . .
}
}

The following explains the regular expression shown in the preceding code:

^ means start looking at this position.
\p{ ..} matches any character in the named character class specified by {..}.
{L} performs a left-to-right match.
{Lu} performs a match of uppercase.
{Ll} performs a match of lowercase.
{Zs} matches separator and space.
'matches apostrophe.
{1,40} specifies the number of characters: no less than 1 and no more than 40.
$ means stop looking at this position.
"

/\ |_ E X E GG
GeneralDealing with dpi Pin
sgatto15918-Aug-05 6:48
sgatto15918-Aug-05 6:48 
GeneralRe: Dealing with dpi Pin
Dan Neely18-Aug-05 7:12
Dan Neely18-Aug-05 7:12 
GeneralRe: Dealing with dpi Pin
sgatto15918-Aug-05 8:24
sgatto15918-Aug-05 8:24 
GeneralGet Message ID after Sending in Message Q Pin
DeepToot18-Aug-05 6:28
DeepToot18-Aug-05 6:28 
GeneralRe: Get Message ID after Sending in Message Q Pin
leppie18-Aug-05 6:36
leppie18-Aug-05 6:36 
GeneralRe: Get Message ID after Sending in Message Q Pin
DeepToot18-Aug-05 6:52
DeepToot18-Aug-05 6:52 
GeneralRe: Get Message ID after Sending in Message Q Pin
eggie518-Aug-05 14:04
eggie518-Aug-05 14:04 
GeneralConverting string Pin
zaboboa18-Aug-05 6:20
zaboboa18-Aug-05 6:20 
GeneralRe: Converting string Pin
theStorminMormon18-Aug-05 7:46
theStorminMormon18-Aug-05 7:46 
GeneralWindows User Control Performance vs. Embedded Code Performance Pin
AnneThorne18-Aug-05 4:56
AnneThorne18-Aug-05 4:56 
GeneralRe: Windows User Control Performance vs. Embedded Code Performance Pin
Mohamad Al Husseiny18-Aug-05 5:10
Mohamad Al Husseiny18-Aug-05 5:10 
Generaltrying to access rows in a table Pin
theStorminMormon18-Aug-05 4:55
theStorminMormon18-Aug-05 4:55 
GeneralRe: trying to access rows in a table Pin
Mohamad Al Husseiny18-Aug-05 5:38
Mohamad Al Husseiny18-Aug-05 5:38 
GeneralRe: trying to access rows in a table Pin
theStorminMormon18-Aug-05 5:41
theStorminMormon18-Aug-05 5:41 
Generalone more question - Pin
theStorminMormon18-Aug-05 5:42
theStorminMormon18-Aug-05 5:42 
GeneralRe: one more question - Pin
Mohamad Al Husseiny18-Aug-05 6:09
Mohamad Al Husseiny18-Aug-05 6:09 
GeneralRe: one more question - Pin
Dan Neely18-Aug-05 7:13
Dan Neely18-Aug-05 7:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.