摘要:
Master 页面: 1 <%@ Master Language="C#" %> 2 3 <script runat="server"> 4 5 string m_PageHeadingTitle = "My Company"; 6 7 public string PageHeadingTitle 8 { 9 get10 {11 return m_PageHeadingTitle;12 }13 set14 {15 m_PageHeadingTitle = value;16 }17 }18 </scrip 阅读全文
摘要:
Master页面: 1 <%@ Master Language="C#" %> 2 3 <script runat="server"> 4 protected void Page_Load(object sender, EventArgs e) 5 { 6 if (!Page.IsPostBack) 7 { 8 Label1.Text = System.Guid.NewGuid().ToString(); 9 }10 }11 </script>12 13 <html xmlns="http://www. 阅读全文
摘要:
1 <%@ Page Language="C#" %> 2 3 <html xmlns="http://www.w3.org/1999/xhtml" > 4 <head id="Head1" runat="server"> 5 <title>Validation Groups</title> 6 </head> 7 <body> 8 <form id="form1" runat="server&q 阅读全文
摘要:
1 <p>First name 2 <asp:TextBox ID="TextBox1" Runat="server"></asp:TextBox> 3 4 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 5 Runat="server" ErrorMessage="You must enter your first name" 6 ControlToValidate 阅读全文
摘要:
1 <%@ Page Language="C#" %> 2 3 <script runat="server"> 4 5 protected void Button1_Click(Object sender, EventArgs e) { 6 Label1.Text = "VALID NUMBER!"; 7 } 8 9 </script>10 11 <html xmlns="http://www.w3.org/1999/xhtml">12 <head id=&qu 阅读全文
摘要:
1 Email: 2 <asp:TextBox ID="TextBox1" Runat="server"></asp:TextBox>3 4 <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 5 Runat="server" ControlToValidate="TextBox1" 6 Text="You must enter an email addres 阅读全文
摘要:
1 <%@ Page Language="C#" %> 2 3 <script runat="server"> 4 protected void Page_Load(object sender, EventArgs e) 5 { 6 RangeValidator1.MinimumValue = DateTime.Now.ToShortDateString(); 7 RangeValidator1.MaximumValue = DateTime.Now.AddDays(14).ToShortDateString(); 8 } 9 阅读全文
摘要:
1 <%@ Page Language="C#" %> 2 3 <script runat="server"> 4 5 protected void Button1_Click(Object sender, EventArgs e) { 6 if (Page.IsValid) 7 Label1.Text = "Passwords match"; 8 } 9 10 </script>11 12 <html xmlns="http://www.w3.org/1999/xhtml" 阅读全文
摘要:
<script runat="server"> protected void Button1_Click(Object sender, EventArgs e) { if (Page.IsValid) { Label1.Text = "Page is valid!"; } }</script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server" id="Head1"> &l 阅读全文
摘要:
阅读全文