前台页面:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><%=newtitle%></title>
后台页面:
//定义字段
public string newtitle;
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
string sql2 = "select TOP 20* from table order by newdate DESC";
SqlDataAdapter da2 = new SqlDataAdapter(sql2, con);
DataSet ds2 = new DataSet();
da2.Fill(ds2, "webinfo2");
DataList2.DataSource = ds2;
DataList2.DataKeyField = "id";
DataBind();
newtitle = "动态title";
}