An unhandled exception occurred while adding the RequiredFieldValidator verification control to the NIU news publishing system. fieldvalidator

Source: Internet
Author: User

An unhandled exception occurred while adding the RequiredFieldValidator verification control to the NIU news publishing system. fieldvalidator

I thought this was the only problem I would have encountered. After I had a chat with my classmates, I knew that everyone had this problem. The main reason was the lack of files in the root directory. You can add it!

Problem:

Solution:

Find the file in the following path. The path may be slightly different depending on the version:

Copy to the bin folder under the root directory of the program

If you don't know, you may not know. You thought that you were not serious about watching the video. The code may be omitted, so you can check the code. In fact, it's easy for Baidu to solve it! What do you think is what you think?


How can I prevent a RequiredFieldValidator control from verifying that the value of the control it controls is an initial value?

You can use the same validation group (ValidationGroup attribute) in the verification control and link button control ). Click the button to verify the text box. The Code is as follows:
<Asp: TextBox ID = "TextBox1" runat = "server"> </asp: TextBox>
<Asp: RequiredFieldValidator ID = "required" runat = "server" ErrorMessage = "RequiredFieldValidator" ValidationGroup = "validLink" ControlToValidate = "TextBox1"> </asp: RequiredFieldValidator
<Asp: LinkButton ID = "LinkButton1" runat = "server" ValidationGroup = "validLink"> LinkButton </asp: LinkButton>

The requiredfieldvalidator control verifies multiple

Isn't the verification controls displayed together after they are put together?
Set their width to dynamic.

// Supplement
Set the Display attribute to "Dynamic", so that if it is not displayed, it will not occupy space.

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.