我是 jQuery 的新手,我现在正在使用 Visual Studio 2010 ASP.NET 页面选项卡。在第一个(开始)页面中,用户必须输入信息才能访问其他选项卡。如果用户没有输入任何信息,我想显示某种警报消息,显示:请输入您的信息。
我所做的是我使用 System.Windows.Forms 实现了 MessageBox.Show(),但如果我发布网页,这将不起作用。我应该如何使用 jQuery 对话框插件来做到这一点?
我有这样的事情:
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script type="text/javascript">
$(function () {
$("#dialog").dialog();
});
</script>
Welcome! Please provide your Number to complete your application:
<asp:TextBox ID="txtSSN" runat="server" TextMode="Password" </asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtSSN" ErrorMessage="*"></asp:RequiredFieldValidator>
<asp:Button ID="btnSubmit" runat="server" onclick="btnSubmit_Click"
Text="Submit" />
<div id="dialog" style="display: none; ">
<p>Please Enter Your Credentials First!</p>
</div>
</asp:Content>