我在Insert.ascx和Update.ascx中都有一些RequiredFieldValidators。我試圖驗證插入頁面,但然後更新頁面中的字段也嘗試驗證,顯示所需的字段驗證消息。如何在.aspx頁面中只驗證一個.ascx頁面,而其他.ascx頁面也在同一個.aspx頁面中註冊?
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.Master"
CodeBehind="client.aspx.cs" Inherits="Saver._Default" %>
<%@ Register TagPrefix="ins" TagName="Viewcomments" Src="Insert.ascx" %>
<%@ Register TagPrefix="upd" TagName="brcmsninfo" Src="Update.ascx" %>
不要忘記點擊旁打勾下面的最有用的答案。 –