Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm about to embark on my first asp.net project, I have a fair grasp of oo (theory more than practical experience) and have done a little bit of vb6 & vb.net windows app work.

 

When using an object orientated approach to an asp application, what is the scope of an instantiated object? Can/how are objects passed between pages? For example if i were to create a news article class and instantiate it on one page, could i use that same instance on another page or would i need to re-instantiate?

 

Apologies if this is a dumb question, have only just started preparing and this is one of the first queries i have.

 

Any help much appreciated,

 

Dan

  • Administrators
Posted

Objects would normally only live for the duration of the page request i.e. they wouldn't be valid on a postback.

There are several possible ways to maintain state information on the server side clicky has a sample project which demonstrates several of the available methods.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...