: 는 이름 'grdViewPersonnel'는 현재 컨텍스트에 존재하지 않는내가이 오류를 받고 있어요
public partial class frmViewPersonnel : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// Declare the DataSet
dsPersonnel myDataSet = new dsPersonnel();
// Fill the dataset with what is returned from the function
myDataSet = clsDataLayer.GetPersonnel(Server.MapPath("PayrollSystem_DB.mdb"));
// Set the DataGrid to the DataSource based on the table
grdViewPersonnel.DataSource = myDataSet.Tables["tblPersonnel"];
// Bind the DataGrid
grdViewPersonnel.DataBind();
}
}
}
.aspx 파일에'grdViewPersonnel'라는 이름의'GridView' 개체가 있습니까? – drdwilcox
@drdwilcox : 고마워, 나는 그것이 단순한 무엇인지 알았다. – Mike