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.