CS0246 error!!!
well i'm studyng on Asp.net Using C# (beginning wrox) and i've find there how to use the code behind
without using Vs.net.
Ok!! I'm using Dreamweaver to write code (i think it's not important) i'm using MySql and i've read that, to make the connection faster, it is better to use a specific .net connector (so I've installed ByteFx).
Well, if i try to write code in Visual studio adding a referement to the new dll the project run. But if i try to write code in dreamweaver an try to execute the aspx page in Ie there is promted this error (i try to translate in english) :" impossible to find type or the space name byteFx probablY there isn't an using direttive ...."
i must inform you the in the assembly directory there are the two dll needed to run the project and also there are defined in the window registry.
Ok i use Win Xp Prof and this is the sample code which causes problem:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using ByteFX.Data.MySqlClient;
public class MyCodeBehind : Page
{
public TextBox name;
public Label message;
public Label message1;
public void SubmitBtn_click(object sender, EventArgs e)
{
string User=name.Text;
message.Text="Hello " + name.Text;
string strconn="Server=localhost; User ID=root; Password = 2429329; Initial Catalog=gestionale";
MySqlConnection conn = new MySqlConnection(strconn);
conn.Open();
string sql="SELECT nome FROM gestionale.anagrafica";
MySqlDataAdapter OleDbCmd = new MySqlDataAdapter(strconn, conn);
OleDbCmd.ExecuteNonQuery();
message1.Text="COMANDO ESEGUITO";
thank yoy very much
|