Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/01/2009, 15:22
Avatar de goc00
goc00
 
Fecha de Ingreso: enero-2002
Ubicación: 000's DiMensiOn
Mensajes: 979
Antigüedad: 22 años, 4 meses
Puntos: 3
¿Qué hay de malo en este código?

Estoy haciendo pruebas y veo que me falta más teoría...

conexion.cs

Código:
using System.Data;
using System.Data.Odbc;

public class Conexion {
	
	string servidor;
	string usuario;
	string contrasena;
	string baseDatos;
	string driver;
	
	public Conexion() {
		// blablabla
	}
}
index.cs:

Código:
// C# Document
using System;
using System.Web.UI;
using System.Web.UI.WebControls;

using Conexion;

public class Inicio:Page {
	
	Label txtNombre = new Label();
	
	public Inicio() {
		txtNombre.Text = "sdf";
	}
	
}
index.aspx:

Código HTML:
<%@ Page Language="C#" Inherits="Inicio" Src="index.cs" ContentType="text/html" ResponseEncoding="iso-8859-1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>P&aacute;gina de Prueba</title>
</head>
<body>
<form runat="server">
	Texto -> <asp:Label id="txtNombre" runat="server"></asp:Label>
</form>
</body>
</html> 
ERROR: The type or namespace name 'Conexion' could not be found (are you missing a using directive or an assembly reference?).

¿Por qué no me está reconociendo la referencia a la clase Conexion?, ¿cuál es la forma correcta de comunicar las clases entre sí?.
__________________
GOC00 CominG soOn v2.0
CyA! & GooD LuCK...