<asp:PlaceHolder ID="pnlThanks" runat="server" Visible="false">
<p><asp:Literal ID="lblReceipt" runat="server"></asp:Literal></p>
</asp:PlaceHolder>
<asp:PlaceHolder ID="pnlForm" runat="server" Visible="true">
<form id="form1" runat="server" class="busgroup-form">
//// All form controls
</form>
</asp:PlaceHolder>
代码隐藏文件:
Protected Sub submit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdsubmit.Click
form1.Controls.Clear()
pnlForm.Visible = False
pnlThanks.Visible = True
End Sub
因此,当“pnlThanks”占位符可见时提交表单后,我可以看到页面上显示的正确内容。但是当我在浏览器上“查看源代码”时,我看到的是表单的源代码,而不是“pnlThanks”占位符内的内容。
我究竟做错了什么 ?