I have question how can I put condition in my programming in windows phone application?
for example, if I want but code for help user when use my application the users cannot add number more than 80 in text box how I do it ?
Could you please help me !!!!
Sounds like you are trying to add range validation to a textbox, but I doubt you are working with XML/XSL. See the forum list to find the forum appropriate for your question. Or you can ask a question in the general "Quick Answers" forum.
Martin Fowler wrote:
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
You could have posted this in a C# forum, you can get an answer much quciker than here. Make sure you are in the right place before posting a question.
Int32 number = Int32.Parse(txtBoxId.Text);
if(number <= 80)
//alert user they have entered a number greater than 80
thrownew Excemption("Not a valid interger!");
That's a basic function you need, you can call this function on your desired textbox events e.g. on onkeypress.
Even if you get it to work, you should let your boss know that the XML was not well-formed so that they fix it for future usage. The tags in XML are there for a reason. You shouldn't have to say I want the text after the empty tag when technically the empty tag was meant to be just empty.
HTML5 now makes the quotes around the attribute optional. It seems like a good idea, because they're just bloating the file most of the time. Of coarse, it's not official xml then, but who cares if it's just an internal file.
Last Visit: 31-Dec-99 18:00 Last Update: 2-Aug-21 0:03