Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / May 2005

Tip: Looking for answers? Try searching our database.

Object instance Across pages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Saket Mundra - 25 May 2005 21:12 GMT
I have a web applicatin with 2 web forms.Form 1 contains 2 textboxes -
txtName, txtAge and Submit button. Form 2 Contains 2 textboxes - txtsubject,
txtSection and submit button. I have a class Student as follows

Public Class Student
    dim name as string
    dim age as string
    dim subject as string
    dim section as string
End Class

I am storing the data entered by user in form 1 in name and age members of
the instantiated class. Then I save the class as session variable. In form 2
I am reffering to same class stored in session varible to access name and age
of student. Then I am trying to store the values of subject and section in
the same class. But i get error message.

I have Following queries regarding same.

1) How do I declare or instantiate my class so that it can be accessed
anywhere in the application and where should i instantiate it? The class
shall be instantiated as session for a user starts and should end when it
ends.

2) I want that data added to class in form 1 shall be available in form 2
and at the same time it shall be possible for me 2 add more data to same
stored class in form 2. How to do this?

Please Help...
Signature

Thank You.

Saket Mundra

Alvin Bruney [MVP - ASP.NET] - 26 May 2005 02:19 GMT
you didn't say what the error message was

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc

>I have a web applicatin with 2 web forms.Form 1 contains 2 textboxes -
> txtName, txtAge and Submit button. Form 2 Contains 2 textboxes -
[quoted text clipped - 28 lines]
>
> Please Help...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.