fguihen Posted May 28, 2004 Posted May 28, 2004 ok ive been through loads of pages showing me how to create a session variable, but when i try it i get an error. heres what i do: i cerate a string called departent. this is initialised with text from a text box i then use the line "Session("department") = Department.text; i get the error "(77): 'System.Web.UI.Page.Session' denotes a 'property' where a 'method' was expected" i have tried loads of other things like Session("SomeName") = Department.text etc etc is there a namespace i need or do i have to create a session object(thought one was automatically created on the server) Quote
wessamzeidan Posted May 28, 2004 Posted May 28, 2004 Session.add("department",department.text) Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Administrators PlausiblyDamp Posted May 28, 2004 Administrators Posted May 28, 2004 Session["department"] = Department.text; I always forget to use [ ] instead of ( ) when switching between vb and c# Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Administrators PlausiblyDamp Posted May 28, 2004 Administrators Posted May 28, 2004 We're all allowed those moments - especially on a Friday :) Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.