我有一個問題,在<table>.. <tr> </tr>
結構中工作,我不知道爲什麼。當UpdatePanel中被註釋掉一切正常,但是當我取消註釋的UpdatePanel的<tr> </tr>
標籤的內容甚至沒有在Visual Studio 2010中顯示出來,當我運行網頁此內容不顯示,但在UpdatePanel沒有按」工作。在這個項目中,我的其他網頁沒有這個問題,但是,我再次使用<div>
而不是<table
> s。另一件事是 。 在我的母版頁。 這裏是我的腳本: <asp:UpdatePanel>不能在表格內工作<tr>?
<asp:UpdatePanel ID="W9UpdatePanel" runat="server" UpdateMode="Always">
<ContentTemplate>
<tr>
<td colspan="6">
<div class="branchSetupSectionTitle">W-9 Information:</div>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnDownloadW9Pdf" runat="server"
Text="Download W-9" onclick="btnDownloadW9Pdf_Click" AutoPostBack="True" />
<%--<asp:RegularExpressionValidator ID="RegularExpressionValidator24"
runat="server" ControlToValidate="txtFirstPaymentAmount" Display="Dynamic"
ErrorMessage="The dollar amount you entered is in the wrong format."
ForeColor="Red" ValidationExpression="^\d+(\.\d\d)?$">*</asp:RegularExpressionValidator>--%>
<asp:CheckBox ID="chkW9FormSubmitted" runat="server" AutoPostBack="True"
oncheckedchanged="chkW9FormSubmitted_CheckedChanged"
Text=" I have submitted this W-9 Form" />
</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
</tr>
的事件觸發兩個按鈕,複選框,但整個頁面被刷新。 感謝您的幫助。
steveekershaw你有沒有嘗試格式化你的項目中的代碼..?什麼是代碼看起來像上面最後看起來你有打算在那裏不能告訴,除非你展示完整的ASPX代碼也有一些格式問題,爲什麼你有這種類型的代碼在你的母版頁..?不應該將代碼放在從MasterPage繼承的Aspx頁面之一中。? – MethodMan 2013-02-22 22:43:07
[應的問題包括標籤的標題?](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles#_=_) - 不,他們不應該。 – Brian 2013-02-22 22:51:21
@布賴恩在這種情況下,它的確定有它,看到這一行'我可以使用jQuery到foo欄上的巴茲,還是我用普通的JavaScript卡住?'。除了他提到的所有內容都被標記在他的問題中。 – AbZy 2013-02-22 22:57:13