Note : code was written in notepad, so there might be some syntax
errors.

to create a variable in session you do this
Session["VariableName"] = "Assign value";

to extract value from session variable do this
string variable = Session["VariableName"];

Note : using large amounts of session variables or using heavy
variables in session is expensive, avoid using session variables as
much as u can.

to compare the column name of a table in sql, do this ( i am assuming
that you have already extracted values from sql and stored them into a
DataTable)
let assume u have a data table named table

foreach (DataColumn column in table.Columns)
{
     if(column.Name.Equals(Session["VariableName"]))
         break;
     continue;
}


On Jul 14, 2:21 pm, gagandeep sharma <[email protected]> wrote:
> how to create a seesion variables in asp.net and how we comapre it with the
> fields of sql server...
>
> if any1 know this, then pls help me
>
> --
> GO and LEAD from Whereever You are.
> Think Big and Think Fast.

Reply via email to