Click here to Skip to main content
15,897,718 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the following code:
Try
            Select Case process.datain
                Case "home"
                    MOTable = selectMO(process.mo, process.mt)
                    If MOTable.Rows.Count() = 0 Then
                        If insertMO(process.mo, process.mt) Then
                            writeMsg("1 MO inserted/updated at ")
                            session("msg") = msgTable.Rows(7)(1).ToString()
                            MsgBox(session("msg"))
                        Else
                            writeMsg("1 MO could not be inserted at ")
                        End If
 Catch ex As Exception
            logFile("executeTimer ----" & ex.Message)
        Finally
            updateProcessed(process.id,session("msg"))
        End Try

I'm facing an error telling me that session is not declared... but i need to use a session to get the value of the row because i need to pass it later on at the end of the code as parameter for a stored procedure. I even tried using :
session.add("msg", msgTable.Rows(7)(1).ToString())

but i'm facing the same error

Can you help me please?

[EDIT]: Shouting removed
Posted
Updated 2-Sep-13 2:44am
v2
Comments
Thanks7872 2-Sep-13 8:45am    
Don't use all capital letters while posting question. Its called shouting and considered rude.
Jocelyne El Khoury 2-Sep-13 8:48am    
okey sry :) any suggestions concerning my issue :( ?

Refer this links

Name 'Session' is not declared [CodeProject] [^]

Name session is not declared ...[^]

Let me know if it doesn't solve the issue.

Regards..:)
 
Share this answer
 
when i'm using
System.Web.HttpContext.Current.Session("msg") = msgTable.Rows(7)(1).ToString()


i'm getting that object reference not set to an instance of an object

now what shall i do?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900