The name <name> does not exist in the current context


M

Montand

Hello Group
Im really new in dotnet and i am modifying what the other programmer did, Im
using VStudio 2005 Pro. I have 16 errors when build the project and all
return this error, i know every one is independent so i going to post just
one: (I don't know if is enough with this code to know what's the problem)
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace sncf.organisms
{
/// <summary>
/// Summary description for groups.
/// </summary>
public partial class groups : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
sncf.classes.sncfclass objSNCF= new sncf.classes.sncfclass();
objSNCF.stringsql="Select Id, f_GroupName from groups Where f_Type=5";
objSNCF.FillDataGrid(DataGrid1);
objSNCF.stringsql="Select Id, f_GroupName, f_Function from groups Where
f_Type=5";
objSNCF.FillDataGrid(DataGrid2);
}

// DataGrid1 and DataGrid2 send me this error.... WHY ??????????????????


#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
protected void LinkButton1_Click(object sender, System.EventArgs e)
{
Response.Redirect("../documents.aspx?Id=5");
}
protected void LinkButton2_Click(object sender, System.EventArgs e)
{
Response.Redirect("../Reunions.aspx?Id=5");
}
}
}

Thanks for your help



________________________
Victor Lopez (Montand)
INDETEC
 
Ad

Advertisements

A

Alexey Smirnov

Hello Group
Im really new in dotnet and i am modifying what the other programmer did, Im
using VStudio 2005 Pro. I have 16 errors when build the project and all
return this error, i know every one is independent so i going to post just
one: (I don't know if is enough with this code to know what's the problem)
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace sncf.organisms
{
/// <summary>
/// Summary description for groups.
/// </summary>
public partial class groups : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
sncf.classes.sncfclass objSNCF= new sncf.classes.sncfclass();
objSNCF.stringsql="Select Id, f_GroupName from groups Where f_Type=5";
objSNCF.FillDataGrid(DataGrid1);
objSNCF.stringsql="Select Id, f_GroupName, f_Function from groups Where
f_Type=5";
objSNCF.FillDataGrid(DataGrid2);

}

// DataGrid1 and DataGrid2 send me this error.... WHY ??????????????????

DataGrid1 and DataGrid2 refer to a DataGrid controls on the web form.
Do you have these controls on your page? Check if they have right name
(DataGrid1 and DataGrid2)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top