1 <Body>2 <Table>3 <caption>User Information table</caption>4 <TR>5 <TDcolspan= "5"style= "text-align:left;padding-left:10px;"title= "User Data add"><ahref= "Useradd.htm">User Data Additions</a></TD>6 </TR>7 <TR>8 <th>EmpId</th>9 <th>EmpName</th>Ten <th>Empage</th> One <th>Delflag</th> A <th>Management</th> - </TR> - <%foreach (Employee rows in employee_list) {%> the <TR> - <TD><%=rows. EmpId%></TD> - <TD><%=rows. EmpName%></TD> - <TD><%=rows. Empage%></TD> + <TD><%=rows. Delflag%></TD> - <TD>Modify |<ahref= "Delete.aspx?id=<%=rows." EmpId%> "onclick= "return Del ()">Delete</a>| browse</TD> + </TR> A <%} %> at </Table> - </Body> - </HTML>
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 using CZBK. Testproject.model;8 9 namespace CZBK. TestProject.WebApp.adminTen { One Public partial class UserList:System.Web.UI.Page A { -Public List<Employee>employee_list {get; set;} - protected void Page_Load (object sender, EventArgs e) the { - BLL. EmployeeService emp = new BLL. EmployeeService (); -List<Employee>list = emp. Getentitylist (); - employee_list = list; + } - } +}
ASP. NET Web Forms aspx Presentation user list