CS0246: The type or namespace name...

Discussion in 'ASP .Net' started by SubZane, Feb 8, 2007.

  1. SubZane

    SubZane Guest

    I've quite new to C# and asp.net and have been following a tutorial in
    an e book on how to make a simple component. However the website
    cannot find my component.

    The component compiles without any errors
    I've added reference to the component in the website
    The DLL is in the Bin folder
    I'm not misspelling it, I've checked several times.

    Component Source:
    -----------------------------------------------------
    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace Components {
    public class SimpleTest1 {
    public string GetInfo(string param) {
    return "Value sent: "+param;
    }
    }
    }
    -----------------------------------------------------

    Website Source:
    -----------------------------------------------------
    ....
    using Components;

    public partial class _Default : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e) {
    SimpleTest1 test = new SimpleTest1();
    string message = test.GetInfo("coolare!");
    Response.Write(message);
    }
    }
    -----------------------------------------------------

    Any help would be nice, I've searched the groups but all I find is
    "have you set the references"
     
    SubZane, Feb 8, 2007
    #1
    1. Advertising

  2. SubZane

    SubZane Guest

    I've found the answer to my problem, I need to make the folder of my
    website an application in order for it to work.

    How to do this:
    1. Start IIS Manager
    2. Locate the folder and choose properties
    3. Click the "Create" Button next to the grayed "Application Name"
    field
    4. Done!

    Now it will work!! yay
     
    SubZane, Feb 9, 2007
    #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. Replies:
    1
    Views:
    5,952
    =?Utf-8?B?TWljaGFlbCBFIEJhbHRpYw==?=
    Mar 16, 2006
  2. Benny Dein
    Replies:
    0
    Views:
    3,456
    Benny Dein
    Mar 20, 2006
  3. =?Utf-8?B?V2ViRGV2Mg==?=
    Replies:
    0
    Views:
    2,747
    =?Utf-8?B?V2ViRGV2Mg==?=
    Aug 24, 2006
  4. Replies:
    4
    Views:
    1,307
  5. ShailKumar
    Replies:
    1
    Views:
    1,613
    Brian Cryer
    Sep 13, 2011
Loading...

Share This Page