简介:
WebForm是微软开发的一款产品,它将用户的请求和响应都封装为控件。让开发者认为自己是在操作一个windows界面。极大地提高了开发效率。
概述:
WinForm是.Net开发平台中对Windows Form的一种称谓。.Net 为开发WinForm的应用程序提供了丰富的Class Library(类库)。这些WinFrom 类库支持RAD(快速应用程序开发),这些类库被封装在一个名称空间之中,这个名称空间就是System.Windows.Forms
目的:
1. 支持事件模型开发。有丰富的服务器端组件。
2. 控件丰富
<table >
<tr><td> <asp:TreeView ID="TreeView1" runat="server" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged">
</asp:TreeView></td>
<td> <asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table border ="1" >
<tr >
<th>编号</th>
<th>姓名</th>
<th>密码</th>
<th>Email</th>
<th>年龄</th>
<th>性别</th>
<th>地区</th>
<th>爱好</th>
<th>图片</th>
<th>操作</th>
</tr>
</HeaderTemplate>
<ItemTemplate >
<tr >
<th><%#Eval ("id") %></th>
<th><%#Eval ("name") %></th>
<th><%#Eval ("pwd") %></th>
<th><%#Eval ("Email") %></th>
<th><%#Eval ("age") %></th>
<th><%#Eval ("sex") %></th>
<th><%#Eval ("deptname") %></th>
<th><%#Eval ("hobby") %></th>
<th>
<asp:Image ID="Image1" ImageUrl='<%#Eval ("images") %>' runat="server" Width ="78px" Height ="25px" /></th>
<th>
<asp:LinkButton ID="LinkButton1" CommandArgument ='<%#Eval ("id") %>' CommandName ="Edit" runat="server">编辑</asp:LinkButton>
<asp:LinkButton ID="LinkButton2" CommandArgument ='<%#Eval ("id") %>' CommandName ="Delete" runat="server" OnClientClick ="return confirm('真的删除吗?')">删除</asp:LinkButton>
</th>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
if (!IsPostBack )
{
this.Label1.Text = Session["name"].ToString ();
userBLL bll = new userBLL();
int deptpid = 0;
DataTable table = bll.tree(deptpid);
TreeNode tn = new TreeNode();
tn.Text = table.Rows[0]["deptname"].ToString ();
tn.Value = table.Rows[0]["deptid"].ToString();
this.TreeView1.Nodes.Add(tn);
Addtable(tn);
int deptid = 0;
Session["deptid"] = deptid;
this .AspNetPager1 .RecordCount = bll.count(deptid);
int index = this.AspNetPager1.CurrentPageIndex;
int size = this.AspNetPager1.PageSize;
DataTable table1 = bll.show(deptid,index ,size );
this.Repeater1.DataSource = table1;
this.Repeater1.DataBind();
}