The type or namespace name could not be found

Discussion in 'ASP .Net' started by vncntj@hotmail.com, Dec 26, 2006.

  1. Guest

    I've tested this project locally, by running it
    http://localhost:1436/Data/gift.aspx and everything is perfect. But if
    it onto the remote server I get "The type or namespace name could not
    be found"


    this is my gift.aspx.cs
    ***************************************
    using System;
    using System.Data;
    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 CampaignsTableAdapters;


    public partial class gift : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e)
    {
    tcampaignsTableAdapter campaignsAdapter = new
    tcampaignsTableAdapter();
    CampaignGI.DataSource = campaignsAdapter.GetCampaigns();
    CampaignGI.DataBind();
    }
    }


    this is my gift.aspx
    *******************************************************
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="gift.aspx.cs"
    Inherits="gift" %>
    <html>
    <body>
    <asp:DropDownList ID="CampaignGI" runat="Server"
    DataTextField="Campaign" DataValueField="Campaign" />&nbsp;&nbsp;
    </body>
    </html>


    I've read other post on the topic, but I don't understand compiling and
    the dll approach to the solution

    thanks in advance,
    V
     
    , Dec 26, 2006
    #1
    1. Advertising

  2. Guest

    Thanks for your reply. I don't think its registered, but I'm not sure
    how I can test to see if it is?


    jeff31162 wrote:
    > If you can not pinpoint the error to a specific line in the code, I would
    > suggest looking in the "References" folder and see if there are any errors in
    > there. My guess is that perhaps a non Microsoft component is not being found
    > on the other machine. Is "CampaignsTableAdapters" installed and registered
    > on the remote server?
    >
    > Jeff
    >
    > "" wrote:
    >
    > > I've tested this project locally, by running it
    > > http://localhost:1436/Data/gift.aspx and everything is perfect. But if
    > > it onto the remote server I get "The type or namespace name could not
    > > be found"
    > >
    > >
    > > this is my gift.aspx.cs
    > > ***************************************
    > > using System;
    > > using System.Data;
    > > 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 CampaignsTableAdapters;
    > >
    > >
    > > public partial class gift : System.Web.UI.Page
    > > {
    > > protected void Page_Load(object sender, EventArgs e)
    > > {
    > > tcampaignsTableAdapter campaignsAdapter = new
    > > tcampaignsTableAdapter();
    > > CampaignGI.DataSource = campaignsAdapter.GetCampaigns();
    > > CampaignGI.DataBind();
    > > }
    > > }
    > >
    > >
    > > this is my gift.aspx
    > > *******************************************************
    > > <%@ Page Language="C#" AutoEventWireup="true" CodeFile="gift.aspx.cs"
    > > Inherits="gift" %>
    > > <html>
    > > <body>
    > > <asp:DropDownList ID="CampaignGI" runat="Server"
    > > DataTextField="Campaign" DataValueField="Campaign" />
    > > </body>
    > > </html>
    > >
    > >
    > > I've read other post on the topic, but I don't understand compiling and
    > > the dll approach to the solution
    > >
    > > thanks in advance,
    > > V
    > >
    > >
     
    , Dec 26, 2006
    #2
    1. Advertising

  3. V
    When you say you move this to remote machine, are you trying to develop
    there, or just run it from there?

    If no development environment then look into your bin directory on the
    remote machine (after you have copied the project files there). Although this
    component may have been "installed" on your local dev machine, when compiled
    in VS I believe a dll for this object should have been placed in the bin dir.
    Then when you copy it to the remote machine, it will be available.

    If you have dev environment on remote then you can open project there and
    add a reference to the component if it is installed on that machine. If it is
    installed, it will show up in the list after clicking "Add Reference".

    Hope something here helps
    Jeff

    "" wrote:

    > Thanks for your reply. I don't think its registered, but I'm not sure
    > how I can test to see if it is?
    >
    >
    > jeff31162 wrote:
    > > If you can not pinpoint the error to a specific line in the code, I would
    > > suggest looking in the "References" folder and see if there are any errors in
    > > there. My guess is that perhaps a non Microsoft component is not being found
    > > on the other machine. Is "CampaignsTableAdapters" installed and registered
    > > on the remote server?
    > >
    > > Jeff
    > >
    > > "" wrote:
    > >
    > > > I've tested this project locally, by running it
    > > > http://localhost:1436/Data/gift.aspx and everything is perfect. But if
    > > > it onto the remote server I get "The type or namespace name could not
    > > > be found"
    > > >
    > > >
    > > > this is my gift.aspx.cs
    > > > ***************************************
    > > > using System;
    > > > using System.Data;
    > > > 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 CampaignsTableAdapters;
    > > >
    > > >
    > > > public partial class gift : System.Web.UI.Page
    > > > {
    > > > protected void Page_Load(object sender, EventArgs e)
    > > > {
    > > > tcampaignsTableAdapter campaignsAdapter = new
    > > > tcampaignsTableAdapter();
    > > > CampaignGI.DataSource = campaignsAdapter.GetCampaigns();
    > > > CampaignGI.DataBind();
    > > > }
    > > > }
    > > >
    > > >
    > > > this is my gift.aspx
    > > > *******************************************************
    > > > <%@ Page Language="C#" AutoEventWireup="true" CodeFile="gift.aspx.cs"
    > > > Inherits="gift" %>
    > > > <html>
    > > > <body>
    > > > <asp:DropDownList ID="CampaignGI" runat="Server"
    > > > DataTextField="Campaign" DataValueField="Campaign" />
    > > > </body>
    > > > </html>
    > > >
    > > >
    > > > I've read other post on the topic, but I don't understand compiling and
    > > > the dll approach to the solution
    > > >
    > > > thanks in advance,
    > > > V
    > > >
    > > >

    >
    >
     
    =?Utf-8?B?amVmZjMxMTYy?=, Dec 26, 2006
    #3
  4. Guest

    J,
    Thanks,
    I'm working on the files locally and then copying them to a remote
    machine. I think I follow when you say "Add Reference". But this is
    where I get a little lost. Is there something specific that I'm
    supposed to be looking for in the "Add Reference".

    Secondly, what files should be located in my bin directory.

    Lastly, when you speak of dll's, are you referring to the dll's that I
    would add under "Add Reference"?

    Thanks,
    V
    jeff31162 wrote:
    > V
    > When you say you move this to remote machine, are you trying to develop
    > there, or just run it from there?
    >
    > If no development environment then look into your bin directory on the
    > remote machine (after you have copied the project files there). Although this
    > component may have been "installed" on your local dev machine, when compiled
    > in VS I believe a dll for this object should have been placed in the bin dir.
    > Then when you copy it to the remote machine, it will be available.
    >
    > If you have dev environment on remote then you can open project there and
    > add a reference to the component if it is installed on that machine. If it is
    > installed, it will show up in the list after clicking "Add Reference".
    >
    > Hope something here helps
    > Jeff
    >
    > "" wrote:
    >
    > > Thanks for your reply. I don't think its registered, but I'm not sure
    > > how I can test to see if it is?
    > >
    > >
    > > jeff31162 wrote:
    > > > If you can not pinpoint the error to a specific line in the code, I would
    > > > suggest looking in the "References" folder and see if there are any errors in
    > > > there. My guess is that perhaps a non Microsoft component is not being found
    > > > on the other machine. Is "CampaignsTableAdapters" installed and registered
    > > > on the remote server?
    > > >
    > > > Jeff
    > > >
    > > > "" wrote:
    > > >
    > > > > I've tested this project locally, by running it
    > > > > http://localhost:1436/Data/gift.aspx and everything is perfect. But if
    > > > > it onto the remote server I get "The type or namespace name could not
    > > > > be found"
    > > > >
    > > > >
    > > > > this is my gift.aspx.cs
    > > > > ***************************************
    > > > > using System;
    > > > > using System.Data;
    > > > > 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 CampaignsTableAdapters;
    > > > >
    > > > >
    > > > > public partial class gift : System.Web.UI.Page
    > > > > {
    > > > > protected void Page_Load(object sender, EventArgs e)
    > > > > {
    > > > > tcampaignsTableAdapter campaignsAdapter = new
    > > > > tcampaignsTableAdapter();
    > > > > CampaignGI.DataSource = campaignsAdapter.GetCampaigns();
    > > > > CampaignGI.DataBind();
    > > > > }
    > > > > }
    > > > >
    > > > >
    > > > > this is my gift.aspx
    > > > > *******************************************************
    > > > > <%@ Page Language="C#" AutoEventWireup="true" CodeFile="gift.aspx.cs"
    > > > > Inherits="gift" %>
    > > > > <html>
    > > > > <body>
    > > > > <asp:DropDownList ID="CampaignGI" runat="Server"
    > > > > DataTextField="Campaign" DataValueField="Campaign" />
    > > > > </body>
    > > > > </html>
    > > > >
    > > > >
    > > > > I've read other post on the topic, but I don't understand compiling and
    > > > > the dll approach to the solution
    > > > >
    > > > > thanks in advance,
    > > > > V
    > > > >
    > > > >

    > >
    > >
     
    , Dec 27, 2006
    #4
  5. Guest

    J,
    I've been playing around a little with this and I think I follow. When
    I click on the bin folder on the solution explorer, I can "Add
    Reference". What dll should I be looking for? Should it be something
    related to the namespace I declared?

    The namespace was called "CampaignsTableAdapters"

    Thanks,
    V



    wrote:
    > J,
    > Thanks,
    > I'm working on the files locally and then copying them to a remote
    > machine. I think I follow when you say "Add Reference". But this is
    > where I get a little lost. Is there something specific that I'm
    > supposed to be looking for in the "Add Reference".
    >
    > Secondly, what files should be located in my bin directory.
    >
    > Lastly, when you speak of dll's, are you referring to the dll's that I
    > would add under "Add Reference"?
    >
    > Thanks,
    > V
    > jeff31162 wrote:
    > > V
    > > When you say you move this to remote machine, are you trying to develop
    > > there, or just run it from there?
    > >
    > > If no development environment then look into your bin directory on the
    > > remote machine (after you have copied the project files there). Although this
    > > component may have been "installed" on your local dev machine, when compiled
    > > in VS I believe a dll for this object should have been placed in the bin dir.
    > > Then when you copy it to the remote machine, it will be available.
    > >
    > > If you have dev environment on remote then you can open project there and
    > > add a reference to the component if it is installed on that machine. If it is
    > > installed, it will show up in the list after clicking "Add Reference".
    > >
    > > Hope something here helps
    > > Jeff
    > >
    > > "" wrote:
    > >
    > > > Thanks for your reply. I don't think its registered, but I'm not sure
    > > > how I can test to see if it is?
    > > >
    > > >
    > > > jeff31162 wrote:
    > > > > If you can not pinpoint the error to a specific line in the code, I would
    > > > > suggest looking in the "References" folder and see if there are any errors in
    > > > > there. My guess is that perhaps a non Microsoft component is not being found
    > > > > on the other machine. Is "CampaignsTableAdapters" installed and registered
    > > > > on the remote server?
    > > > >
    > > > > Jeff
    > > > >
    > > > > "" wrote:
    > > > >
    > > > > > I've tested this project locally, by running it
    > > > > > http://localhost:1436/Data/gift.aspx and everything is perfect. But if
    > > > > > it onto the remote server I get "The type or namespace name could not
    > > > > > be found"
    > > > > >
    > > > > >
    > > > > > this is my gift.aspx.cs
    > > > > > ***************************************
    > > > > > using System;
    > > > > > using System.Data;
    > > > > > 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 CampaignsTableAdapters;
    > > > > >
    > > > > >
    > > > > > public partial class gift : System.Web.UI.Page
    > > > > > {
    > > > > > protected void Page_Load(object sender, EventArgs e)
    > > > > > {
    > > > > > tcampaignsTableAdapter campaignsAdapter = new
    > > > > > tcampaignsTableAdapter();
    > > > > > CampaignGI.DataSource = campaignsAdapter.GetCampaigns();
    > > > > > CampaignGI.DataBind();
    > > > > > }
    > > > > > }
    > > > > >
    > > > > >
    > > > > > this is my gift.aspx
    > > > > > *******************************************************
    > > > > > <%@ Page Language="C#" AutoEventWireup="true" CodeFile="gift.aspx.cs"
    > > > > > Inherits="gift" %>
    > > > > > <html>
    > > > > > <body>
    > > > > > <asp:DropDownList ID="CampaignGI" runat="Server"
    > > > > > DataTextField="Campaign" DataValueField="Campaign" />
    > > > > > </body>
    > > > > > </html>
    > > > > >
    > > > > >
    > > > > > I've read other post on the topic, but I don't understand compiling and
    > > > > > the dll approach to the solution
    > > > > >
    > > > > > thanks in advance,
    > > > > > V
    > > > > >
    > > > > >
    > > >
    > > >
     
    , Dec 27, 2006
    #5
    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. Matthew Louden
    Replies:
    2
    Views:
    6,117
    Marco Martin
    Dec 12, 2003
  2. =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=

    The type or namespace name 'KeyPressEventArgs' could not be found

    =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=, Nov 17, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,770
    =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=
    Nov 17, 2004
  3. Replies:
    1
    Views:
    5,988
    =?Utf-8?B?TWljaGFlbCBFIEJhbHRpYw==?=
    Mar 16, 2006
  4. Benny Dein
    Replies:
    0
    Views:
    3,488
    Benny Dein
    Mar 20, 2006
  5. Replies:
    0
    Views:
    672
Loading...

Share This Page