1.点击按钮后台函数响应, 选择执行操作的按钮 后面添加“OnClick="xxxx"”(xxxx为函数名)
例<asp:Button ID="sureLogin" runat="server" Height="29px" Text="登录"
Width="74px" OnClick="Click_Login"/>2.页面输出内容。如果想输出任意字符,提示语可以用Response.Write("账号不合法!");
3.页面间跳转。如果是同一项目或者同一网站可以直接用: Response.Redirect("student.aspx");
4.判断textbox中输入是否为数字
int tmp;
if (!int.TryParse(userName.Text, out tmp)){
Response.Write("账号不合法!");
}