Click here to Skip to main content
15,899,937 members
Home / Discussions / C#
   

C#

 
AnswerRe: Why Does by-value-passing object change? Pin
Colin Angus Mackay10-Apr-07 11:35
Colin Angus Mackay10-Apr-07 11:35 
GeneralRe: Why Does by-value-passing object change? Pin
Ali Beirami10-Apr-07 11:43
Ali Beirami10-Apr-07 11:43 
GeneralRe: Why Does by-value-passing object change? Pin
Christian Graus10-Apr-07 11:49
protectorChristian Graus10-Apr-07 11:49 
GeneralRe: Why Does by-value-passing object change? Pin
Ali Beirami10-Apr-07 11:59
Ali Beirami10-Apr-07 11:59 
GeneralRe: Why Does by-value-passing object change? Pin
Russell Jones10-Apr-07 21:39
Russell Jones10-Apr-07 21:39 
GeneralRe: Why Does by-value-passing object change? Pin
Russell Jones10-Apr-07 21:41
Russell Jones10-Apr-07 21:41 
QuestionHow to Export Gridview to Exel sheet in C#.net Pin
sundeeppatil10-Apr-07 11:13
sundeeppatil10-Apr-07 11:13 
QuestionHow to discard invalid (ASCII 0-32) user input in editbox? [modified] Pin
SandeepN10-Apr-07 9:09
SandeepN10-Apr-07 9:09 
I created simple DialogBased Windows application using C#
I want to check if user has entered any control characters in the edit box.

For Ex: in the edit box user can enter value like
ALT + 8 (BackSpace)
ALT + 9 (Horixontal Tab ) etc
Though it looks funny but I want to discard this input.

I tried to convert the string to int and check ASCII it did not work
EX:
Int32 nLength = str.Length;
for(int i=0;i<nlength;i++)
{
int asciival="System.Convert.ToInt32(str[i]);"

if(asciival="" <="" 33="" &&=""> 0 )
Discard the input;

}

In this scenario for ALT + 8 I get asciival as 9688
ALT+9 as 9675.

This is to check whether control characters entered?
Why do I get ALT+8 as 9688 not as 8 asci value ?

I want to basically check if user has entered any control characters
like 1-32 or 127 ASCII value (Ex: ALT + 127) in the edit box. And discard the same.
FYI this edit box should allow any other non english characters like French, German, Chinese, Japanese etc


-- modified at 17:44 Tuesday 10th April, 2007

Thanks, Sandeep Naik

AnswerRe: How to discard invalid (ASCII 0-32) user input in editbox? Pin
kubben10-Apr-07 12:15
kubben10-Apr-07 12:15 
GeneralRe: How to discard invalid (ASCII 0-32) user input in editbox? [modified] Pin
SandeepN10-Apr-07 12:39
SandeepN10-Apr-07 12:39 
QuestionXslCompiledTransform.Transform() to a string Pin
eggie510-Apr-07 8:56
eggie510-Apr-07 8:56 
AnswerRe: XslCompiledTransform.Transform() to a string Pin
eggie510-Apr-07 9:24
eggie510-Apr-07 9:24 
QuestionStoring references in a class Pin
Ephoy10-Apr-07 8:39
Ephoy10-Apr-07 8:39 
AnswerRe: Storing references in a class Pin
Martin#10-Apr-07 9:11
Martin#10-Apr-07 9:11 
GeneralRe: Storing references in a class Pin
Ephoy10-Apr-07 10:09
Ephoy10-Apr-07 10:09 
GeneralRe: Storing references in a class [modified] Pin
Martin#11-Apr-07 3:11
Martin#11-Apr-07 3:11 
AnswerRe: Storing references in a class Pin
Scott Dorman10-Apr-07 17:48
professionalScott Dorman10-Apr-07 17:48 
GeneralRe: Storing references in a class Pin
Ephoy11-Apr-07 0:11
Ephoy11-Apr-07 0:11 
GeneralRe: Storing references in a class Pin
Scott Dorman12-Apr-07 2:53
professionalScott Dorman12-Apr-07 2:53 
Questionconvert grayscale array to Image Pin
aei_totten10-Apr-07 7:17
aei_totten10-Apr-07 7:17 
QuestionMDI application childform maximize Pin
sinosoidal10-Apr-07 6:33
sinosoidal10-Apr-07 6:33 
AnswerRe: MDI application childform maximize Pin
il_masacratore11-Apr-07 21:29
il_masacratore11-Apr-07 21:29 
QuestionString Manipulation Question Pin
JMOdom10-Apr-07 6:20
JMOdom10-Apr-07 6:20 
AnswerRe: String Manipulation Question Pin
Are Jay10-Apr-07 8:47
Are Jay10-Apr-07 8:47 
QuestionC# accessing Excel Pin
shamidi10-Apr-07 5:55
shamidi10-Apr-07 5:55 

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.