|
-
Jan 13th, 2005, 04:39 PM
#1
Thread Starter
PowerPoster
Re: gets null!
sweet - ill give it a bash thanks a bunch!
ASP.NET ROX!
-
Jan 14th, 2005, 10:06 AM
#2
Thread Starter
PowerPoster
Re: gets null!
sorry, i completly forgot and lost it.
how is this going to work? how can i create an object from one aspx page, store it, and let another aspx page(s) access that object on a UID?
-
Jan 14th, 2005, 11:22 AM
#3
Addicted Member
Re: gets null!
Well what you can do is once you have created your object, you can add it to your Session state (Session.Add("NameOfObject", aObject)) or Application state (Application.Add("NameOfObject", aObject)). This will store your object across requests. If you want the diff between the two go search on google :P
Then on the next aspx page your can get your object out of that state:
VB Code:
Dim aObject as new ClassName = ctype(session.item("NameOfObject", ClassName)
There are many other ways to do it, but this is just a simple way for storing a small amount of data.
-
Jan 14th, 2005, 11:41 AM
#4
Thread Starter
PowerPoster
Re: gets null!
thanks
-
Jan 17th, 2005, 06:36 AM
#5
Thread Starter
PowerPoster
Re: gets null!
well it doesnt seem to want to accept that
after the "=" in that code, vb.net complains that it should have expected an end statement
-
Jan 17th, 2005, 09:59 AM
#6
Addicted Member
Re: gets null!
sorry
VB Code:
Dim aObject as new ClassName
aObject = CType(Session.Item("NameOfObject"), ClassName)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|