“company”并不包含“info1”的定义?
我在company.aspx中建立了 <asp:Label ID="info1" runat="server" Text="loding..."></asp:Label>为什么调试运行时还提示:
“company”并不包含“info1”的定义
using System;
using System.Data;
using System.Data.OleDb;
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 OleDbHelper;
public partial class company : System.Web.UI.Page
{
public string Titlep;
public string Descriptionp;
public string Keywordsp;
protected void Page_Load(object sender, EventArgs e)
{
OleDbHelper.OleDbHelper oledbhepler = new OleDbHelper.OleDbHelper();
OleDbDataReader dr;
try
{
oledbhepler.RunCmd("select * from about where class='公司介绍'", out dr);
}
catch (Exception ex)
{
SystemError.CreateErrorLog(ex.Message);
throw new Exception(ex.Message, ex);
}
while (dr.Read())
{
this.info1.Text = dr["About"].ToString();
}
dr.Close();
}
}