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

Discussion in 'ASP .Net' started by Montand, Feb 19, 2008.

  1. Montand

    Montand Guest

    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
    Montand, Feb 19, 2008
    #1
    1. Advertising

  2. On Feb 19, 9:41 pm, "Montand" <prueba> wrote:
    > 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)
    Alexey Smirnov, Feb 20, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arjen
    Replies:
    1
    Views:
    9,719
    =?Utf-8?B?RGF2aWQgSmVzc2Vl?=
    Aug 21, 2006
  2. =?Utf-8?B?TWljaGFlbA==?=

    The name 'UserName' does not exist in the current context"?

    =?Utf-8?B?TWljaGFlbA==?=, Oct 26, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    811
    Mark Fitzpatrick
    Oct 26, 2006
  3. J055
    Replies:
    3
    Views:
    3,423
  4. Peter Morris
    Replies:
    2
    Views:
    6,598
    Peter Morris
    Mar 17, 2008
  5. avecreep
    Replies:
    0
    Views:
    563
    avecreep
    Aug 5, 2008
Loading...

Share This Page