1.Cs页面代码:显示信息
namespace ajax_demo
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string name1 = Request["name"].ToString();
DataTable dt = GetDt(name1);
StringBuilder sb = new StringBuilder();
sb.Append("<table align='center' bgcolor='green' border='1px' width='500px'>");
sb.Append("<tr><td>员工id</td><td>姓名</td><td>性别</td><td>年龄</td></tr>");
for (int i = 0; i < dt.Rows.Count; i++)
{
sb.Append("<tr>");
sb.Append("<td>" + dt.Rows[i]["eid"] + "</td>");