我正在使用ASP.NET 1.1,我遇到了我的validationsummary和validationcontrols工作的問題。點擊按鈕時,所需的字段驗證等不會被觸發。我該如何解決?Validationsummary不顯示onclick按鈕
下面的代碼:
<asp:ValidationSummary id="EsppDataInputValidationSummary" runat="server" Font-Names="Arial" Font-Size="8pt" HeaderText="Please Correct the following error(s):" DisplayMode="List" ShowSummary="True"></asp:ValidationSummary></TD>
<asp:RequiredFieldValidator id="Validator1" runat="server" Font-Size="8pt" Font-Names="Arial"
ControlToValidate="txtPrice" Display="None" ErrorMessage="Please enter the Price"></asp:RequiredFieldValidator>
<asp:textbox onblur="return ValidateLength(this)" style="Z-INDEX: 0; TEXT-ALIGN: right" id="txtPurchasePrice" onkeypress="return IsValidChar(event);" onkeyup="return ValidateLength(this)" runat="server" Width="160px" MaxLength="10"></asp:textbox>
<asp:button id="btnAdd" runat="server" Text="Add"></asp:button>"
可能有幾種解釋這一點,我們需要看到你的代碼... –
我的意思是你的所有相關代碼...在ASPX或代碼隱藏爲好。 –
請參閱上面更新 – user2545231