AddStudent.aspx
<form id="form1" runat="server">
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td >
<asp:Label ID="lblName" runat="server">名字</asp:Label>
</td>
<td >
<asp:TextBox ID="tbName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td >
<asp:Label ID="lblImg" runat="server">缩略图</asp:Label>
</td>
<td >
<asp:FileUpload ID="FileUpload1" runat="server" />
</td>
</tr>
<tr>
<td>
内容简介
</td>
<td>
<asp:TextBox ID="tbContext" runat="server" Height="100px" MaxLength="10000" Rows="20" TextMode="MultiLine" Width="220px"></asp:TextBox>
</td>
</tr>
<tr>
<td >
<asp:Label ID="lblCategories" runat="server">类别</asp:Label>
</td>
<td >
<asp:RadioButton ID="rd1" runat="server" Text="优秀" GroupName="rd" />
<asp:RadioButton ID="rd2" runat="server" Text="精英" GroupName="rd" />
</td>
</tr>
<tr>
<td >
<asp:Button ID="btnOK" runat="server" Text="提交" OnClick="btnOK_Click" />
</td>
</tr>
</table>
<div>
</div>
</form>
数据库表
create table HT_U_AddStudent
(
ID int primary key identity(1,1),
StuName nvarchar(50) not null,
Img nvarchar(200) not null,
Context varchar(1000),
Categories bit default 1,
IsTop int not null
)