C
CdnRebel via DotNetMonster.com
Hi,
I am new to ASP.Net, C# and Visual Studio 5. I have until tonight to
complete changes to a website, otherwise it gets passed on to a web
development company, if not up and running. I've made all the changes, but
with having an older version of ASP.Net and using Visual Studio 5, I am
having trouble getting a clean compile and I believe that's all that's
holding me back from loading the website changes. The above is just one of
the slew of messages I am getting on this one bit of code and I don't
understand the messages or how to fix them. It doesn't help that it's after
midnight here. The following is the code, lines 21 to 61:
namespace Furniture
{
/// <summary>
/// Summary description for AddNewProduct.
/// </summary>
// public partial class Migrated_AddNewProduct : AddNewProduct
{
protected System.Web.UI.WebControls.LinkButton lnkAddNewProduct;
protected System.Web.UI.WebControls.RequiredFieldValidator
Requiredfieldvalidator3;
protected void Page_Load(object sender, System.EventArgs e)
{
if(Session["SessionUserID"] != null)
{
lnkTopRight.Text="ADMINISTRATION";
lnkTopRight.NavigateUrl="ProductManagement.aspx";
}
else
{
lnkTopRight.Text="LOG IN";
lnkTopRight.NavigateUrl="login.aspx";
}
txtOrderNumber.Attributes.Add("OnChange", "ClientOnChange();");
int intCatID = 0;
int intSubID=0;
if(!IsPostBack)
{
if(Request["CatID"] !=null)
{
intCatID=int.Parse(Request["CatID"] .ToString());
}
if(Request["SubID"] !=null)
{
intSubID=int.Parse(Request["SubID"] .ToString());
}
LoadCategoryList(intCatID,intSubID);
}
}
The following are the errors that I got:
Error 1 A namespace does not directly contain members such as fields or
methods ...line 27 column 2
Error 2 Expected class, delegate, enum, interface, or struct ...line 28
column 13
Error 3 Expected class, delegate, enum, interface, or struct ...line 29
column 13
Error 4 Expected class, delegate, enum, interface, or struct ...line 31
column 13
Error 5 Identifier expected ...line 33 column 15
Error 6 Identifier expected ...line 51 column 16
Error 7 Identifier expected ...line 53 column 33
Error 8 A namespace does not directly contain members such as fields or
methods ...line 55 column 5
Error 9 Identifier expected ...line 55 column 16
Error 10 Identifier expected ...line 57 column 33
Error 11 Type or namespace definition, or end-of-file expected ...line 58
column 5
Error 12 The namespace 'Furniture' already contains a definition for '?' line
51 column 15
Error 13 The namespace 'Furniture' already contains a definition for '?' ...
line 53 column 32
Error 14 The namespace '<global namespace>' already contains a definition for
'?' ...line 57 column 32
Can someone please help? I was supposed to get help tonight, but he bailed
without any warning and I am working on this by myself.
I am new to ASP.Net, C# and Visual Studio 5. I have until tonight to
complete changes to a website, otherwise it gets passed on to a web
development company, if not up and running. I've made all the changes, but
with having an older version of ASP.Net and using Visual Studio 5, I am
having trouble getting a clean compile and I believe that's all that's
holding me back from loading the website changes. The above is just one of
the slew of messages I am getting on this one bit of code and I don't
understand the messages or how to fix them. It doesn't help that it's after
midnight here. The following is the code, lines 21 to 61:
namespace Furniture
{
/// <summary>
/// Summary description for AddNewProduct.
/// </summary>
// public partial class Migrated_AddNewProduct : AddNewProduct
{
protected System.Web.UI.WebControls.LinkButton lnkAddNewProduct;
protected System.Web.UI.WebControls.RequiredFieldValidator
Requiredfieldvalidator3;
protected void Page_Load(object sender, System.EventArgs e)
{
if(Session["SessionUserID"] != null)
{
lnkTopRight.Text="ADMINISTRATION";
lnkTopRight.NavigateUrl="ProductManagement.aspx";
}
else
{
lnkTopRight.Text="LOG IN";
lnkTopRight.NavigateUrl="login.aspx";
}
txtOrderNumber.Attributes.Add("OnChange", "ClientOnChange();");
int intCatID = 0;
int intSubID=0;
if(!IsPostBack)
{
if(Request["CatID"] !=null)
{
intCatID=int.Parse(Request["CatID"] .ToString());
}
if(Request["SubID"] !=null)
{
intSubID=int.Parse(Request["SubID"] .ToString());
}
LoadCategoryList(intCatID,intSubID);
}
}
The following are the errors that I got:
Error 1 A namespace does not directly contain members such as fields or
methods ...line 27 column 2
Error 2 Expected class, delegate, enum, interface, or struct ...line 28
column 13
Error 3 Expected class, delegate, enum, interface, or struct ...line 29
column 13
Error 4 Expected class, delegate, enum, interface, or struct ...line 31
column 13
Error 5 Identifier expected ...line 33 column 15
Error 6 Identifier expected ...line 51 column 16
Error 7 Identifier expected ...line 53 column 33
Error 8 A namespace does not directly contain members such as fields or
methods ...line 55 column 5
Error 9 Identifier expected ...line 55 column 16
Error 10 Identifier expected ...line 57 column 33
Error 11 Type or namespace definition, or end-of-file expected ...line 58
column 5
Error 12 The namespace 'Furniture' already contains a definition for '?' line
51 column 15
Error 13 The namespace 'Furniture' already contains a definition for '?' ...
line 53 column 32
Error 14 The namespace '<global namespace>' already contains a definition for
'?' ...line 57 column 32
Can someone please help? I was supposed to get help tonight, but he bailed
without any warning and I am working on this by myself.