M
Mark
Hi,
I'm fairly new to .NET and having problems getting an ASP.NET page
working on my web host.
The page works fine on my PC running against localhost. I have a MySQL
database and a simple C# app with an odbcConnection object,
odbcDataAdapter and a datasetCustomers object placed on the form.
On page load, I fill the datasetCustomers from the "Customers" table
retrieved via the odbcDataAdapter and then bind this to a DataGrid on
the form - this works perfectly on localhost and the web-page displays
the contents of the Customers table.
I've got the same database on the webhost and I'm fairly sure it
should all work, but I get the following error: -
Compiler Error Message: CS0234: The type or namespace name
'dsCustomers' does not exist in the class or namespace
'BoundMySQLTest' (are you missing an assembly reference?)
Source Error:
Line 24: protected System.Data.Odbc.OdbcCommand odbcInsertCommand1;
Line 25: protected System.Web.UI.WebControls.DataGrid DataGrid1;
Line 26: protected BoundMySQLTest.dsCustomers dsCustomers1;
Line 27:
Line 28: private void Page_Load(object sender, System.EventArgs e)
It states the error is with line 26.
The only change I've made before uploading it is to change the top
line in Webform1.aspx from: -
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="BoundMySQLTest.WebForm1"%>
to: -
<%@ Page language="c#" Src="WebForm1.aspx.cs" AutoEventWireup="false"
Inherits="BoundMySQLTest.WebForm1"%>
For some reason, none of my projects work on my webhost with the
"Codebehind" line - I always have to change it to Src.
Other than this, the project is identical - works on localhost, but
not on my webserver.
I've had a good read around on here - read a few articles about
manually adding references in the Global.asax, but I have to admit I'm
still fairly confused.
Any help would be greatly appreciated,
Mark.
I'm fairly new to .NET and having problems getting an ASP.NET page
working on my web host.
The page works fine on my PC running against localhost. I have a MySQL
database and a simple C# app with an odbcConnection object,
odbcDataAdapter and a datasetCustomers object placed on the form.
On page load, I fill the datasetCustomers from the "Customers" table
retrieved via the odbcDataAdapter and then bind this to a DataGrid on
the form - this works perfectly on localhost and the web-page displays
the contents of the Customers table.
I've got the same database on the webhost and I'm fairly sure it
should all work, but I get the following error: -
Compiler Error Message: CS0234: The type or namespace name
'dsCustomers' does not exist in the class or namespace
'BoundMySQLTest' (are you missing an assembly reference?)
Source Error:
Line 24: protected System.Data.Odbc.OdbcCommand odbcInsertCommand1;
Line 25: protected System.Web.UI.WebControls.DataGrid DataGrid1;
Line 26: protected BoundMySQLTest.dsCustomers dsCustomers1;
Line 27:
Line 28: private void Page_Load(object sender, System.EventArgs e)
It states the error is with line 26.
The only change I've made before uploading it is to change the top
line in Webform1.aspx from: -
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="BoundMySQLTest.WebForm1"%>
to: -
<%@ Page language="c#" Src="WebForm1.aspx.cs" AutoEventWireup="false"
Inherits="BoundMySQLTest.WebForm1"%>
For some reason, none of my projects work on my webhost with the
"Codebehind" line - I always have to change it to Src.
Other than this, the project is identical - works on localhost, but
not on my webserver.
I've had a good read around on here - read a few articles about
manually adding references in the Global.asax, but I have to admit I'm
still fairly confused.
Any help would be greatly appreciated,
Mark.