Re: PassingObjectstoWebForms

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rick Strahl [MVP] (rickstrahl_at_hotmail.com)
Date: 03/07/04


Date: Sat, 6 Mar 2004 14:00:03 -1000

HI J,

You can store the object into a Session var and pick it up in following
forms. This works well assuming that the object you are storing is
serializable.

If you're using Server.Transfer() or Server.Excute() you can also use
Context.Items() to store request specific info to pass to transferred pages.

+++ Rick ---

-- 
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"J" <j@netscape.net> wrote in message
news:ODlq6J5AEHA.3400@tk2msftngp13.phx.gbl...
> I have an object that gets created when the first ASP.NET webform, of
> the web app, is opened.  I need to pass this object to other webforms as
> they are opened and keep the scope in the same session.  How can I do
this?
>
> Thanks
>


Relevant Pages

  • Re: Web app on a web server, but run on localhost
    ... You have to know where your web app runs, ... As for the database setup error, it is because you are using SQL Server2005/Express as ASP.NET website's management data store, such as membershipmanagement. ... In this case, the data file used by SQL Server/Express must be on the computer where SQL Server/Express installs, i.e. must be on local drive, not on network location. ...
    (microsoft.public.dotnet.framework.aspnet)
  • DirectoryServices
    ... A system that is being designed will use ActiveDirectory to store ... userinformation for a SQL Server 200 base web app. ... to AD after getting the windwos user account from SQL Server. ...
    (microsoft.public.dotnet.framework)
  • Re: which way to cluster/partition?
    ... > Say you have a web app you want to scale out. ... Option 3 is the very common in production environments requiring high levels ... you can store session state info, and you can also store that info in the DB ... On the backend, many orgs that require HA will cluster their ...
    (microsoft.public.windows.server.clustering)
  • Re: storing data in a desktop app
    ... add/edit tasks and later get reports about the tasks completed.I ... thought of doing it as a web app with hsqldb to store data.Then,when ... to data storage inside my appliation and thus invisible to the user?Or ...
    (comp.lang.java.programmer)
  • Re: Use RunAs command with NT AuthorityNetwork account for DPAPI
    ... You can only use the DPAPI machine store in asp.net - DPAPI is dependent on user profiles which don't get loaded by IIS. ... the 3rd-party web app company doesn't specify an ... that security context. ...
    (microsoft.public.dotnet.framework.aspnet.security)