CS0246: The type or namespace name...

S

SubZane

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);
}
}
 
S

SubZane

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top