瀏覽代碼

two 2.0 tests. one tests HtmlForm.DefaultButton (defaultbutton.aspx), and the other tests HtmlForm.DefaultFocus along with which setting takes precedence (defaultfocus.aspx)

svn path=/trunk/mcs/; revision=48985
Chris Toshok 20 年之前
父節點
當前提交
ecddef6772

+ 12 - 0
mcs/class/System.Web/Test/standalone/htmlform/defaultbutton.aspx

@@ -0,0 +1,12 @@
+<%@ Page Language="C#" %>
+<html>
+  <head>
+    <title>HtmlForm test</title>
+  </head>
+  <body>
+    <form defaultbutton="Button" id="form1" runat="server">
+      <asp:LinkButton name="Button" id="Button" Text="Hi There" runat="server"/>
+    </form>
+  </body>
+</html>
+

+ 14 - 0
mcs/class/System.Web/Test/standalone/htmlform/defaultfocus.aspx

@@ -0,0 +1,14 @@
+<%@ Page Language="C#" %>
+<html>
+  <head>
+    <title>HtmlForm test</title>
+  </head>
+  <body>
+    <form defaultfocus="entry" defaultbutton="Button"  id="form1" runat="server">
+      <asp:TextBox id="firstone" Text="this won't have focus" runat="server"/>
+      <asp:TextBox id="entry" Text="this will" runat="server"/>
+      <asp:LinkButton name="Button" id="Button" Text="Hi There" runat="server"/>
+    </form>
+  </body>
+</html>
+