Hi,
I am working on .NET 2003, C#. I have created a class file and getting...
The name 'Session' does not exist in the class or namespace
'RADWebV5.RADAs p.Class.Connect ion'
Connection.cs code....
using System;
using System.Data.Ora cleClient;
using System.Web.Sess ionState;
namespace RADWebV5.RADAsp .Class
{
/// <summary>
/// Summary description for Connection.
/// </summary>
public class Connection
{
public Connection()
{
//
// TODO: Add constructor logic here
//
}
public static string LogOn(string UserID, string Password)
{
OracleConnectio n objConnection = null;
OracleDataReade r objReader = null;
try
{
Session["UserID"] = UserID;
Session["Password"] = Password;
}
catch (Exception err)
{
return "Source : " + err.Source + "\nMessage : " + err.Message;
}
finally
{
if (objReader != null)
{
objReader.Close ();
objReader.Dispo se();
}
if (objConnection != null)
{
objConnection.C lose();
objConnection.D ispose();
}
}
}
}
}
_______________ ________
Not sure what I am doing wrong.
Thanks,
- Reena
I am working on .NET 2003, C#. I have created a class file and getting...
The name 'Session' does not exist in the class or namespace
'RADWebV5.RADAs p.Class.Connect ion'
Connection.cs code....
using System;
using System.Data.Ora cleClient;
using System.Web.Sess ionState;
namespace RADWebV5.RADAsp .Class
{
/// <summary>
/// Summary description for Connection.
/// </summary>
public class Connection
{
public Connection()
{
//
// TODO: Add constructor logic here
//
}
public static string LogOn(string UserID, string Password)
{
OracleConnectio n objConnection = null;
OracleDataReade r objReader = null;
try
{
Session["UserID"] = UserID;
Session["Password"] = Password;
}
catch (Exception err)
{
return "Source : " + err.Source + "\nMessage : " + err.Message;
}
finally
{
if (objReader != null)
{
objReader.Close ();
objReader.Dispo se();
}
if (objConnection != null)
{
objConnection.C lose();
objConnection.D ispose();
}
}
}
}
}
_______________ ________
Not sure what I am doing wrong.
Thanks,
- Reena
Comment