前台布局

  1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default1.aspx.cs" Inherits="Default1" %>
  2 
  3 
  4 
  5 "http://www.w3.org/1999/xhtml">
  6 "server">
  7     "Content-Type" content="text/html; charset=utf-8" />
  8     
  9     
104 
105 
106     
"form1" runat="server"> 107
"div_1"> 108
"div_2-1"> 109 战网 110
111
"div_2-2"> 112
"div_2-2-1"> 113
"div_2-2-1-1">用户登录
114
"div_2-2-1-2"> 115 用户名:"TextBox1" runat="server">"Label1" runat="server" Text="">
116
117
118
119 密   码:"TextBox2" runat="server"> 120
121
"div_2-2-1-3"> 122 "Button1" runat="server" Text="登录" OnClick="Button1_Click"> 123
124
125
126
"div_2-3"> 127 战网游戏官方版权所有,侵权必究! 128
129
130
131 132

后台代码

 1 using System;
 2 using System.Collections.Generic;
 3 using System.Linq;
 4 using System.Web;
 5 using System.Web.UI;
 6 using System.Web.UI.WebControls;
 7 
 8 public partial class Default1 : System.Web.UI.Page
 9 {
10     protected void Page_Load(object sender, EventArgs e)
11     {
12 
13     }
14     protected void Button1_Click(object sender, EventArgs e)
15     {
16         Label1.Text = "用户名错误";
17     }
18 }

效果图

 

注册

 

前台布局

  1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
  2 
  3 
  4 
  5 "http://www.w3.org/1999/xhtml">
  6 "server">
  7     "Content-Type" content="text/html; charset=utf-8" />
  8     
  9     
101 
102 
103     
"form1" runat="server"> 104
"div_1"> 105
"div_2-1"> 106 战网 107
108
"div_2-2"> 109
"div_2-2-1"> 110
"div_2-2-1-1">用户注册
111
"div_2-2-1-2"> 112 用  户  名:"TextBox1" runat="server">"Label1" runat="server" Text=""> 113
114
115
116 密       码:"TextBox2" runat="server"> 117
118
119
120 重复密码:"TextBox3" runat="server"> 121
122
123
124 昵       称:"TextBox4" runat="server"> 125
126
127
128 性       别:"RadioButtonList1" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"> 129 "True">男 130 131 132
133
134
135 出生年月:"DropDownList1" runat="server">"DropDownList2" runat="server">"DropDownList3" runat="server">136
137
138
139 民       族:"DropDownList4" runat="server"> 140
141
"div_2-2-1-3"> 142 "Button1" runat="server" Text="注 册">              "Button2" runat="server" Text="重 置" /> 143
144
145
146
"div_2-3"> 147 战网游戏官方版权所有,侵权必究! 148
149
150
151 152

效果图