asp.net+sql甜品在线商城毕业设计带论文

在这里插入图片描述
前台:新闻列表 详情、产品列表详情、注册 登录

会员中心:个人账号查看 修改、购物车(查看 删除 付款 结算)、订单管理(查看 删除) 、退出

后台:用户管理(查看 删除)、商品管理(发布 查看 修改 删除)、新闻管理(发布 查看 修改 删除)、退出

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)
{

}
  • 12
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值