📄 default.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Width="221px"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Width="420px"></asp:TextBox><br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource2" AllowPaging="True" AllowSorting="True" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" DataKeyNames="ID" ForeColor="Black" GridLines="Vertical" >
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" Visible="False" />
<asp:BoundField DataField="Stu_Num" HeaderText="Stu_Num" SortExpression="Stu_Num" />
<asp:BoundField DataField="Stu_Name" HeaderText="Stu_Name" SortExpression="Stu_Name" />
<asp:CommandField ShowEditButton="True" />
<asp:CommandField ShowDeleteButton="True" />
<asp:CommandField ShowSelectButton="True" />
</Columns>
<FooterStyle BackColor="#CCCCCC" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#CCCCCC" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:shiyongConnectionString %>"
DeleteCommand="DELETE FROM stu where ID=@id" SelectCommand="SELECT * FROM [stu]"
UpdateCommand="UPDATE stu SET Stu_Name = @stu_name, Stu_Num = @stu_num WHERE (ID = @id)">
<UpdateParameters>
<asp:Parameter Name="id" />
<asp:Parameter Name="stu_name" />
<asp:Parameter Name="stu_num" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList1" runat="server" Width="105px">
<asp:ListItem>106028001</asp:ListItem>
<asp:ListItem>106028002</asp:ListItem>
<asp:ListItem>106028003</asp:ListItem>
<asp:ListItem>106028004</asp:ListItem>
<asp:ListItem>106028005</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /><br />
<br />
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label><br />
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox><br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Button" /></div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -