I need to access a session variable called "usuario" created from another class.
First, I have the following class called Default.aspx.vb
Protected Sub btnvalidar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnvalidar.Click
Dim fila As DataRow
Dim nombre As String = ""
For Each fila In tabla.Rows
nombre = fila("referencia")
Next
Session.Add("usuario", nombre)
I need to access this variable from the following class called CConexion.vb
_adaptador.SelectCommand = New MySqlCommand("select * from empresas where usuario=Session("usuario")", _conexion)