|
Hi All,
Can anyone let me know how I can validate the textbox for allowing only numeric charcters and restricting special characters.
Thank you!
Sincerely,
Deepa!
|
|
|
|
|
Hi
I use below method :
public bool isNumberSymbol(char KeyChar)
{
bool state=false ;
if (KeyChar > 31 && (KeyChar < '0' || KeyChar > '9'))
state = true;
return (state) ;
}
private void AiTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = isNumberSymbol(e.KeyChar);
}
For any problem contact me.
Regards.
|
|
|
|
|
Use event KeyPress from textbox, and write something like this in eventhandler:
if (char.IsNumber(e.KeyChar) || e.KeyChar == (char) Keys.Back)
{
e.Handled = false;
}
else
{
e.Handled = true;
}
This sample of code allows only numeric and backspace in textbox.
|
|
|
|
|
The correct code is
e.Handled = ! (Char.IsNumeric(e.KeyChar) || Char.IsControl(e.KeyChar));
If you want to allow a numeric range, it gets trickier, you need to work out the selectionarea of the text, and replace it with the keychar, then work out if it's in the range, to decide if you want to reject the keypress.
|
|
|
|
|
Dear Respected Programmers
Kindly let me know that, Which Crystal Report version is built-in in C# 2005?
Thank you in advance
|
|
|
|
|
A modified version of Crystal Reports X (CR 10).
|
|
|
|
|
thank you spy777
|
|
|
|
|
Hello
I develope my project in C# 2005.
My question is this :
Microsoft fixed so problems in .Net 2005 controls like DataGrid which it's so easier to use now.
Is it right about ListView control too ? I can't add button column to ListView.
I saw "XPTable Customized ListView" document about this in codeproject but it has some problems.
(?) How can i graphically simulate button in listview with images ?
(?) Or Is it a button column property in ListView 2005?
Tanx.
|
|
|
|
|
A ListView is a C++ control, wrapped in C#. There is no support for buttons in the manner that you are hoping.
|
|
|
|
|
Sounds like you're not in the right folder to run csc, you probably need to add it to your PATH variable.
|
|
|
|
|
thanku so much Christian Graus for your help,its working now that's why i have deleted the msg.
Thank u so much once again.
|
|
|
|
|
Please don't do that, it makes the boards look messy, and means that others with the same question can't as easily gain benefit from my reply.
|
|
|
|
|
hello,
I want to as you
how i translate my remarks in the code (///)
into an HTML file?
|
|
|
|
|
|
Hi
i want to set the autoscroll=true in an MDI. but when i try to do so, IsMdiContainer becomes false from true. in other words i can't set the value of both properties to true. if i do so, i get an error that the form in not an mdi container. can someone tell me why i am getting that kind of behaviour from VS?
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
i think autoscroll property is ment to show scroll bars when controls on the form are going out of client area and MDI form is ment as container for other child forms,not for controls on it thats why u can not set both properties true same time.
rahul
|
|
|
|
|
Hi all,
I just want to know something about the GIOS PDF article: http://www.codeproject.com/cs/library/giospdfnetlibrary.asp?df=100&forumid=172932[^]
what do we need in our documentation if we use GIOS? Like When you use FOP you need the Copy Right slogan and the license agreement.
But i can't see anything about this in the GIOS article?
Thank you in advance.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi Code Project Team.
Someone know if it's porssible make subquerys in Excel using OleDb?
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
The Microsoft.Jet.OLEDB provider supports IN, ANY/SOME/ALL, and EXISTS subqueries. Thus, you should also be able to make these subqueries with Excel. I have not tested this, however.
|
|
|
|
|
How can I print Barcode with no page?
Who can tell me,Thank you!!!!
|
|
|
|
|
What do you mean by 'no page' ? Do you have the barcode in a bitmap ? Are you generating it at all, or is that your question ?
There are articles on this site on generating barcodes.
|
|
|
|
|
I would like to know if there is a simple way to traverse an HTMLDocument using XPath in C#. All the solutions I have seen so far, involve converting the HTML to XML and then using the XML document for XPATH navigation. I would like to know if there is a way to go through the DOM using XPATH like DOM Level 3 does and not have to convert HTML to XML.
|
|
|
|
|
If your HTML is not XHTML, then there's no way to parse it with the DOM, or any other XML technology, as it's not XML.
Well, written HTML IS XML, it doesn't need converting.
|
|
|
|
|
Christian Graus wrote: Well, written HTML IS XML, it doesn't need converting.
Assuming that it is XHTML, of course. HTML is not XML.
---
b { font-weight: normal; }
|
|
|
|
|
I thought I just said that ? Who writes HTML now and DOESN'T write XHTML ?
|
|
|
|