public string zhaopin;
public string pic;
public string zizhi;
public string title;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Maticsoft.BLL.gsclass bll = new Maticsoft.BLL.gsclass();
Maticsoft.Model.gsclass model = bll.GetModel(47);
zhaopin = model.content;
Maticsoft.BLL.newscontent bll1 = new Maticsoft.BLL.newscontent();
DataSet ds = bll1.GetListbytop(" title<>'' order by id desc",6);
this.Repeater1.DataSource = ds.Tables[0].DefaultView;
this.Repeater1.DataBind();
Maticsoft.BLL.product bll3 = new Maticsoft.BLL.product();//5~1+a+s+p+x
DataSet ds2 = bll3.GetListbytop("", 6);
this.DataList1.DataSource = ds2.Tables[0].DefaultView;
this.DataList1.DataBind();
pic = DB.FindString("select gspic from gsclass where id=39");
zizhi = DB.FindString("select classname from gsclass where id=39");
Maticsoft.BLL.gsclass bll4 = new Maticsoft.BLL.gsclass();
Maticsoft.Model.gsclass model2 = bll4.GetModel(40);
title = DB.cutTitle(model2.content, 280);
初学 .NET,不知下面这段代码,什么意思,请高手指点。代码如下。
答案:1 悬赏:30 手机版
解决时间 2021-03-11 23:05
- 提问者网友:原来太熟悉了会陌生
- 2021-03-11 12:06
最佳答案
- 五星知识达人网友:人類模型
- 2021-03-11 13:45
//可能你的代码没有贴全,就你贴的这些代码来看:
Maticsoft.BLL.gsclass bll = new Maticsoft.BLL.gsclass();
Maticsoft.Model.gsclass model = bll.GetModel(47);
zhaopin = model.content;//这三句完全没用到
Maticsoft.BLL.newscontent bll1 = new Maticsoft.BLL.newscontent();
DataSet ds = bll1.GetListbytop(" title<>'' order by id desc",6);
this.Repeater1.DataSource = ds.Tables[0].DefaultView;
this.Repeater1.DataBind();//这几句是给页面的Repeater控件绑值
Maticsoft.BLL.product bll3 = new Maticsoft.BLL.product();//5~1+a+s+p+x
DataSet ds2 = bll3.GetListbytop("", 6);
this.DataList1.DataSource = ds2.Tables[0].DefaultView;
this.DataList1.DataBind();//这是给DataList绑值
pic = DB.FindString("select gspic from gsclass where id=39");//很明显 执行查询语句
zizhi = DB.FindString("select classname from gsclass where id=39");//同上
Maticsoft.BLL.gsclass bll4 = new Maticsoft.BLL.gsclass();
Maticsoft.Model.gsclass model2 = bll4.GetModel(40);//得到一个实体(对象)
title = DB.cutTitle(model2.content, 280);//照起名看 应该是根据上面那个实体的某字段和280这个值删除title
Maticsoft.BLL.gsclass bll = new Maticsoft.BLL.gsclass();
Maticsoft.Model.gsclass model = bll.GetModel(47);
zhaopin = model.content;//这三句完全没用到
Maticsoft.BLL.newscontent bll1 = new Maticsoft.BLL.newscontent();
DataSet ds = bll1.GetListbytop(" title<>'' order by id desc",6);
this.Repeater1.DataSource = ds.Tables[0].DefaultView;
this.Repeater1.DataBind();//这几句是给页面的Repeater控件绑值
Maticsoft.BLL.product bll3 = new Maticsoft.BLL.product();//5~1+a+s+p+x
DataSet ds2 = bll3.GetListbytop("", 6);
this.DataList1.DataSource = ds2.Tables[0].DefaultView;
this.DataList1.DataBind();//这是给DataList绑值
pic = DB.FindString("select gspic from gsclass where id=39");//很明显 执行查询语句
zizhi = DB.FindString("select classname from gsclass where id=39");//同上
Maticsoft.BLL.gsclass bll4 = new Maticsoft.BLL.gsclass();
Maticsoft.Model.gsclass model2 = bll4.GetModel(40);//得到一个实体(对象)
title = DB.cutTitle(model2.content, 280);//照起名看 应该是根据上面那个实体的某字段和280这个值删除title
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯