// 在此处放置用户代码以初始化页面
if (IsSafe(Request.QueryString["id"],2)==false)
{
Response.Write("非法参数,<a href=BlogIndex.aspx>点此返回</a>");
Response.End();
}
string ST_dns = ConfigurationSettings.AppSettings["conStr"];
string ST_sql = "select * from ST_news where ST_n_id=" +Request.QueryString["id"] +"";
//最新推荐文章
string ST_cmd_sql = "select top 10 * from ST_news where ST_n_iscmd=1 order by ST_n_id desc";
ST_myConn = new SqlConnection(ST_dns);
SqlDataAdapter ST_myCmd = new SqlDataAdapter(ST_sql,ST_myConn);
SqlDataAdapter ST_classCmd = new SqlDataAdapter("select ST_c_id,ST_c_name from ST_class",ST_myConn);
SqlDataAdapter ST_cmdCmd = new SqlDataAdapter(ST_cmd_sql,ST_myConn);
DataSet ST_ds = new DataSet();
ST_myCmd.Fill(ST_ds,"新闻查看");
DataSet ST_classds = new DataSet();
ST_classCmd.Fill(ST_classds,"类别列表");
DataSet ST_cmdds = new DataSet();
ST_cmdCmd.Fill(ST_cmdds,"推荐文章");