Lazy to have to judge the input value of the TextBox output prompt value, the result point two program exception

Source: Internet
Author: User

The debug program is bitter and happy,

In order to prevent users from directly click to import the following table, so I set a hint, click on the first to determine whether there is no value in the textbox, empty words also in the textbox to do hints

The procedure is as follows:

Point once can be output to the textbox normally, the point of the second time the program has an exception:

First time

Second time:

What's the situation, this is? Set breakpoints did not reflect, a variety of doubts, environmental problems? How to break the breakpoint, have not seen such a strange problem ah, the result suddenly realized

The project set up release mode. thus

Set breakpoint Hint: No breakpoints are currently being hit and no symbols have been loaded for the document;

Change to debug, run, and finally know where the problem is.

The program ran to the else inside, if this has run to else inside go, of course else did not judge is also a problem, this is something, first say if Judge a TextBox judge empty how still run to else inside,

Later, the textbox was assigned value, the first click, the prompt value assigned to the TextBox, so the point is not empty, and then ran to the else inside

Replace with debug, error such as:

Or debug mode is good. Either there is a problem or there is no clue where it is.

Lazy to have to judge the input value of the TextBox output prompt value, the result point two program exception

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.