求解:编译器错误消息: CS1061: “AdminManage_GoodsManage”不包含“GridView1”的定义
编译器错误消息:CS1061:“AdminManage_GoodsManage”不包含“GridView1”的定义,并且找不到可接受类型为“AdminManage_Goo...
编译器错误消息: CS1061: “AdminManage_GoodsManage”不包含“GridView1”的定义,并且找不到可接受类型为“AdminManage_GoodsManage”的第一个参数的扩展方法“GridView1”(是否缺少 using 指令或程序集引用?)
源错误:
行 101: DataSet mydata = new DataSet();
行 102: sda.Fill(mydata);
行 103: this.GridView1.DataSource = mydata.Tables[0];
行 104: this.GridView1.DataBind();
行 105: SelectLog("查询");
源文件: d:\零食销售网站111\零食销售网站\AdminManage\GoodsManage.aspx.cs 行: 103
代码:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net;
public partial class AdminManage_GoodsManage : System.Web.UI.Page
{
string strconnection = @"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\零食销售网站111\零食销售网站\App_Data\db_NetShop_Data.MDF;Integrated Security=True;User Instance=True";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetData();
}
}
public void SelectLog(string btt)
{
String ip;
if (Context.Request.ServerVariables["HTTP_VIA"] != null) // using proxy
{ 展开
源错误:
行 101: DataSet mydata = new DataSet();
行 102: sda.Fill(mydata);
行 103: this.GridView1.DataSource = mydata.Tables[0];
行 104: this.GridView1.DataBind();
行 105: SelectLog("查询");
源文件: d:\零食销售网站111\零食销售网站\AdminManage\GoodsManage.aspx.cs 行: 103
代码:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net;
public partial class AdminManage_GoodsManage : System.Web.UI.Page
{
string strconnection = @"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\零食销售网站111\零食销售网站\App_Data\db_NetShop_Data.MDF;Integrated Security=True;User Instance=True";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetData();
}
}
public void SelectLog(string btt)
{
String ip;
if (Context.Request.ServerVariables["HTTP_VIA"] != null) // using proxy
{ 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询