找不到类型或命名空间名称“News”(是否缺少 using 指令或程序集引用?)
usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingS...
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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.OleDb;
using System.Xml;
public partial class houtai_wenzhanglist : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void down()
{
News wenzhang = new News(); //在此地出现错误
DataTable dt = wenzhang.GetList();
for (int j = 0; j < dt.Rows.Count; j++)
{
DataRowView drv = dt.DefaultView[j];
//判断长度
if (drv[1].ToString().Length > 18)
{
drv[1] = drv[1].ToString().Substring(0, 18) + "...";
}
}
GridView1.DataSource = dt;
GridView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.GridView1.PageIndex = e.NewPageIndex;
down();
}
} 展开
using System.Data;
using System.Configuration;
using System.Collections;
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.OleDb;
using System.Xml;
public partial class houtai_wenzhanglist : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void down()
{
News wenzhang = new News(); //在此地出现错误
DataTable dt = wenzhang.GetList();
for (int j = 0; j < dt.Rows.Count; j++)
{
DataRowView drv = dt.DefaultView[j];
//判断长度
if (drv[1].ToString().Length > 18)
{
drv[1] = drv[1].ToString().Substring(0, 18) + "...";
}
}
GridView1.DataSource = dt;
GridView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.GridView1.PageIndex = e.NewPageIndex;
down();
}
} 展开
2个回答
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询