R
Reena
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.RADAsp.Class.Connection'
Connection.cs code....
using System;
using System.Data.OracleClient;
using System.Web.SessionState;
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)
{
OracleConnection objConnection = null;
OracleDataReader 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.Dispose();
}
if (objConnection != null)
{
objConnection.Close();
objConnection.Dispose();
}
}
}
}
}
_______________________
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.RADAsp.Class.Connection'
Connection.cs code....
using System;
using System.Data.OracleClient;
using System.Web.SessionState;
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)
{
OracleConnection objConnection = null;
OracleDataReader 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.Dispose();
}
if (objConnection != null)
{
objConnection.Close();
objConnection.Dispose();
}
}
}
}
}
_______________________
Not sure what I am doing wrong.
Thanks,
- Reena