if I do not put the namespace in my classes (vs .net 2008), what namespace does my classes build under?
Update
It is strange that when I add a namespace, I cannot reference class methods from my user control.
If I explicitly set the namespace and add “use ...” to my control, I still can't see it!
How can it be?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
public class Globals
{
public Globals()
{ }
public static string ConnectionString
{
get
{
return ConfigurationManager.ConnectionStrings["MyDb"].ConnectionString;
}
}
}
My management:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class MyStats : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
source
share