I have the following program flow for my web app i am developing. All the files are in the same directory, Webtools\<filename>
WebCheck.aspx (inherits WebCheck.aspx.cs)
WebCheck.aspx.cs
NSLookup.cs (custom class for resolving hostnames/IPs)
WebCheck.aspx.cs looks like this:
using Statements......
namespace WebTools
{
public class WebCheck : Page
{
public void Start()
{
........some code
NSLookup.isHostAddress(inputSite)
}
}
}
NSLookup.cs looks like this:
namespace WebTools
{
public class NSLookup
{
// Determine if it's a Host Address
public bool isHostAddress(String address)
{
....some code
}
}
}
I recieve the following compilation error:
CS0103: The name 'NSLookup' does not exist in the current context
If I try to add, as a test:
NSLookup look = new NSLookup();
I recieve CS0246: The type or namespace name 'NSLookup' could not be found (are you missing a using directive or an assembly reference?)
So it's obviously just not fidning anything called NSLookup
I thought that the 2 classes could see eachother reguardless of being in different files. I think I am missing something because of the ASP.NET environment.
I know that there is something I need to do so that WebCheck.aspx.cs knows where the NSLookup class is. But how do i accomplish this?
Note: this worked fine when the 2 classes were in the same file. I moved the NSLookup class over to another file.
WebCheck.aspx (inherits WebCheck.aspx.cs)
WebCheck.aspx.cs
NSLookup.cs (custom class for resolving hostnames/IPs)
WebCheck.aspx.cs looks like this:
using Statements......
namespace WebTools
{
public class WebCheck : Page
{
public void Start()
{
........some code
NSLookup.isHostAddress(inputSite)
}
}
}
NSLookup.cs looks like this:
namespace WebTools
{
public class NSLookup
{
// Determine if it's a Host Address
public bool isHostAddress(String address)
{
....some code
}
}
}
I recieve the following compilation error:
CS0103: The name 'NSLookup' does not exist in the current context
If I try to add, as a test:
NSLookup look = new NSLookup();
I recieve CS0246: The type or namespace name 'NSLookup' could not be found (are you missing a using directive or an assembly reference?)
So it's obviously just not fidning anything called NSLookup
I thought that the 2 classes could see eachother reguardless of being in different files. I think I am missing something because of the ASP.NET environment.
I know that there is something I need to do so that WebCheck.aspx.cs knows where the NSLookup class is. But how do i accomplish this?
Note: this worked fine when the 2 classes were in the same file. I moved the NSLookup class over to another file.