simplemain.aspx
来自「csharp课本的源代码」· ASPX 代码 · 共 75 行
ASPX
75 行
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SimpleMain.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>Web服务器控件的一个简单例子</title>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: left">
<span style="font-size: 32pt"> <span style="font-size: 24pt"> 用户注册</span><br />
<span style="font-size: 10pt">
<br />
</span>
<span style="font-size: 16pt"> 用 户 名:
<asp:TextBox ID="textBoxName" runat="server"></asp:TextBox><br />
<span style="font-size: 10pt">
<br />
</span>
密 码 : <asp:TextBox ID="textBoxPassword" runat="server" TextMode="Password"></asp:TextBox><br />
<span style="font-size: 10pt">
<br />
</span>
性 别 :
<asp:RadioButton ID="radioButtonMale" runat="server" Text="男" GroupName="性别" />
<asp:RadioButton ID="radioButtonFemale" runat="server" Text="女" GroupName="性别" /><br />
<span style="font-size: 10pt"> </span><br />
职 业 :<br />
<span style="font-size: 10pt"> </span><br />
<asp:RadioButtonList ID="radioButtonListWork" runat="server" Height="35px" RepeatColumns="4"
Width="387px">
<asp:ListItem>公务员</asp:ListItem>
<asp:ListItem>医务工作者</asp:ListItem>
<asp:ListItem>教师</asp:ListItem>
<asp:ListItem>经商</asp:ListItem>
</asp:RadioButtonList><span style="font-size: 10pt"> </span><br />
所属省份:
<asp:DropDownList ID="dropDownListProvince" runat="server" AutoPostBack="True" OnSelectedIndexChanged="dropDownListProvince_SelectedIndexChanged">
<asp:ListItem>河北省</asp:ListItem>
<asp:ListItem>山东省</asp:ListItem>
<asp:ListItem>浙江省</asp:ListItem>
</asp:DropDownList><br />
<span style="font-size: 10pt">
<br />
</span>
所在城市:<br />
<asp:ListBox ID="listBoxCity" runat="server" Height="52px" Width="184px"></asp:ListBox><br />
<span style="font-size: 10pt">
<br />
</span>
<p style="text-align: left">爱 好 :</p>
<p style="text-align: left">
<asp:CheckBoxList ID="checkBoxListHobby" runat="server" Height="59px" RepeatColumns="2" Width="267px">
<asp:ListItem>球类运动</asp:ListItem>
<asp:ListItem>读书看报</asp:ListItem>
<asp:ListItem>田径运动</asp:ListItem>
<asp:ListItem>聊天交友</asp:ListItem>
</asp:CheckBoxList><span style="font-size: 10pt"> </span>
</span></span></P><p style="text-align: left">
<span style="font-size: 32pt"><span style="font-size: 16pt"></span></span>
<span style="font-size: 32pt"><span style="font-size: 16pt">
<asp:Button ID="buttonOK" runat="server" Height="29px" OnClick="buttonOK_Click" Text="确 定"
Width="75px" /><br />
</span>
</span>
</p>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?