首先要为div加上 runat="server" 属性。 前台代码: <head runat="server"> <title>Category</title> </head> <body> <form id="form1" runat="server"> <div id ="categoryDiv" runat="server" > </div> <div id ="bookListDiv" runat="server" > </div> </form> </body> 然后在C#代码中将要在div中呈现的的html代码赋给categoryDiv的InnerHtml属性即可。 后台代码: //获取数据 DataSet dsCategory = category.getCategory(); DataTable dtCategory = dsCategory.Tables[0]; DataRowCollection drCategory = dtCategory.Rows; //创建字符串 StringBuilder categoryString = new StringBuilder(); //拼接 categoryString.Append("<Table>"); for (int i = 0; i < drCategory.Count; i++) { //在table中循环拼接超链接 //onclick =/"getBooksByCategoryId({0}); 用于激发ajax回调方法 categoryString.Append(String.Format("<tr><td><a href="/" mce_href="/""#/" onclick =/"getBooksByCategoryId({0});/">{1}</a>", drCategory[i]["PKId"], drCategory[i]["Description"])); } categoryString.Append("</Table>"); //发给Div categoryDiv.InnerHtml = categoryString.ToString();