Комментарии:
ادا في صوت كان احسن
ОтветитьThank you so much for that
ОтветитьEasy and works perfectly
Ответитьprivate void OnlyNumbers(KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
{
e.Handled = true;
}
}
Hello, 1BestCsharp blog!
I tried to use your solution, but there is no Keypress event defined for TextBox!
Maybe you are using an older version of .NET?
why statement !char is meaning "NOT" but program allow input , i'm confusing. please advise.
ОтветитьHi.can i know how to set a range for input allowed? for number
ОтветитьThanks. That'll be handy
ОтветитьEarned my subscription.
Ответитьi want to add restriction for text box in maximum value and minimum value. how to code it?
Ответитьwhat if i want the number to be float 15.60 the " . " not accepted
ОтветитьThank you. It helped a lot.
ОтветитьThank you. Worked perfectly.
Ответитьnot working for me.. :(
ОтветитьDoes any solution exist if you're making a UWP app with C#?
Ответитьplz reply quick
Ответитьcan u tell me what to do if we have to use such validations for email in textbox?
jese mne email enter krane k ek textbox use kia hai,but email me to @ or fullstop "." bhi use hte hain to in 2 keywords ko kese daala ja skta hai using keypress?
kindly help as it is a lot urgent...
doesnt accept white space
ОтветитьHello i am cynthia and i am looking for how to convert a double give in a toolbox to a string with c#
cann you please help me?