Click here to Skip to main content
16,005,121 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I Implement Virtual tour with C#? Pin
jschell21-Mar-12 9:06
jschell21-Mar-12 9:06 
QuestionValidating textboxes in C# Pin
Xonel20-Mar-12 21:54
Xonel20-Mar-12 21:54 
AnswerRe: Validating textboxes in C# Pin
Not Active20-Mar-12 22:21
mentorNot Active20-Mar-12 22:21 
GeneralRe: Validating textboxes in C# Pin
Xonel20-Mar-12 22:30
Xonel20-Mar-12 22:30 
GeneralRe: Validating textboxes in C# Pin
Not Active20-Mar-12 22:45
mentorNot Active20-Mar-12 22:45 
GeneralRe: Validating textboxes in C# Pin
taha bahraminezhad Jooneghani20-Mar-12 23:14
taha bahraminezhad Jooneghani20-Mar-12 23:14 
GeneralRe: Validating textboxes in C# Pin
Vipin_Arora21-Mar-12 0:54
Vipin_Arora21-Mar-12 0:54 
GeneralRe: Validating textboxes in C# Pin
Vipin_Arora21-Mar-12 1:04
Vipin_Arora21-Mar-12 1:04 
If u only want to validate decimal, then you can try following code at textbox change event:


C#
void textBox1_TextChanged(object sender, EventArgs e)
        {
            if (textBox1.Text.Trim() != "")
            {
                decimal j;
                if (!decimal.TryParse(textBox1.Text, out j))
                {
                    MessageBox.Show("Not allowed!!!");
                    textBox1.Text = "";
                }
            }
        } 

private Here, replace "textBox1" with your textbox ID.
AnswerRe: Validating textboxes in C# Pin
Bernhard Hiller20-Mar-12 22:34
Bernhard Hiller20-Mar-12 22:34 
AnswerRe: Validating textboxes in C# Pin
BobJanova21-Mar-12 3:08
BobJanova21-Mar-12 3:08 
AnswerRe: Validating textboxes in C# Pin
PIEBALDconsult21-Mar-12 3:10
mvePIEBALDconsult21-Mar-12 3:10 
AnswerRe: Validating textboxes in C# Pin
DaveyM6921-Mar-12 3:28
professionalDaveyM6921-Mar-12 3:28 
GeneralRe: Validating textboxes in C# Pin
Xonel21-Mar-12 19:49
Xonel21-Mar-12 19:49 
GeneralRe: Validating textboxes in C# Pin
DaveyM6924-Mar-12 22:36
professionalDaveyM6924-Mar-12 22:36 
QuestionNET Lib to read / change / write MAT (MatLab) files Pin
Rene Sattler20-Mar-12 21:08
Rene Sattler20-Mar-12 21:08 
AnswerRe: NET Lib to read / change / write MAT (MatLab) files Pin
Ravi Bhavnani21-Mar-12 7:00
professionalRavi Bhavnani21-Mar-12 7:00 
GeneralRe: NET Lib to read / change / write MAT (MatLab) files Pin
Rene Sattler21-Mar-12 20:46
Rene Sattler21-Mar-12 20:46 
QuestionClass Diagram in C# 2010 Express? Pin
DRAYKKO77720-Mar-12 14:19
DRAYKKO77720-Mar-12 14:19 
AnswerRe: Class Diagram in C# 2010 Express? Pin
Abhinav S20-Mar-12 16:50
Abhinav S20-Mar-12 16:50 
QuestionCode Insertion Issue Pin
mauricemcse20-Mar-12 9:33
mauricemcse20-Mar-12 9:33 
AnswerRe: Code Insertion Issue Pin
wizardzz20-Mar-12 10:02
wizardzz20-Mar-12 10:02 
GeneralCode Insertion Issue [continued] Pin
mauricemcse20-Mar-12 19:48
mauricemcse20-Mar-12 19:48 
AnswerRe: Code Insertion Issue Pin
BobJanova21-Mar-12 3:13
BobJanova21-Mar-12 3:13 
Questionbackup problem Pin
nitish_0720-Mar-12 9:08
nitish_0720-Mar-12 9:08 
AnswerRe: backup problem Pin
Luc Pattyn20-Mar-12 9:44
sitebuilderLuc Pattyn20-Mar-12 9:44 

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.