前台:新闻列表 详情、产品列表详情、注册 登录
会员中心:个人账号查看 修改、购物车(查看 删除 付款 结算)、订单管理(查看 删除) 、退出
后台:用户管理(查看 删除)、商品管理(发布 查看 修改 删除)、新闻管理(发布 查看 修改 删除)、退出
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class shownews1 : System.Web.UI.Page
{
public string newsid;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
newsid = Request.Params[“id”];
SqlConnection myConn = GetConnection();
string sqlStr = "select * from news where id= " + newsid;
SqlDataAdapter myDa = new SqlDataAdapter(sqlStr, myConn);
DataSet myDs = new DataSet();
myDa.Fill(myDs, “news”);
this.GridView1.DataSource = myDs.Tables[“news”].DefaultView;
this.GridView1.DataBind();
}
}
public SqlConnection GetConnection()
{
string myStr = ConfigurationManager.AppSettings["ConnectionString"].ToString();
SqlConnection myConn = new SqlConnection(myStr);
return myConn;
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}