473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

A class visible through out the site?

I have a registeration which is divided on 3 pages, i want to have a class
that i can create on the 1st page, collect the data from page 1 and add the
values to vars in the class, then page 2 and add to vars then page 3 and add
vars then i call a web service @ page 3 and send all the data i collected.

i created a static global class, but it doesnt create a new instance every
call for the app, so if i have 2 ppl using the app it wont keep the vars
sperated.

thanks
mustafa
Nov 19 '05 #1
3 1052
It sounds like you're talking about Session data, and should look at
using the ASP.NET built in support for Session. I know I had been
taught not to use Session in Classic ASP, but the ASP.NET Session
System is efficient and scalable.

If you're storing per-user information at the application level, you're
not going to expire it when the application times out, you may have to
deal with concurrency issues, etc. Session handles all that for you.

Plus, if you use Session you can switch to a Session Server or use SQL
Server Session State which will allow you to run your application in a
load balanced environment if required later. If you're storing the
information in memory, you can't scale out.
- Jon
http://weblogs.asp.net/jgalloway

Nov 19 '05 #2
put the class in the session. you might want to make sure its serializable
"Mustafa Rabie" <mr*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a registeration which is divided on 3 pages, i want to have a class
that i can create on the 1st page, collect the data from page 1 and add the values to vars in the class, then page 2 and add to vars then page 3 and add vars then i call a web service @ page 3 and send all the data i collected.

i created a static global class, but it doesnt create a new instance every
call for the app, so if i have 2 ppl using the app it wont keep the vars
sperated.

thanks
mustafa

Nov 19 '05 #3
thanks a lot fo ryour help guys.
but from my understanding, please correct me if i am wrong, but isn't it
suppose that every call to the web app creates a new instance, with it's own
vars, classes etc? or does that has to be delt with via sessions?

Thanks
Mustafa
"David Jessee" <dj*****@houston.rr.com> wrote in message
news:e$**************@TK2MSFTNGP15.phx.gbl...
put the class in the session. you might want to make sure its
serializable
"Mustafa Rabie" <mr*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a registeration which is divided on 3 pages, i want to have a
class
that i can create on the 1st page, collect the data from page 1 and add

the
values to vars in the class, then page 2 and add to vars then page 3 and

add
vars then i call a web service @ page 3 and send all the data i
collected.

i created a static global class, but it doesnt create a new instance
every
call for the app, so if i have 2 ppl using the app it wont keep the vars
sperated.

thanks
mustafa


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Steve | last post by:
Visual Studio 2003 .Net / C# I have a 2 page Tab Control for users to add a Job in my application. The first page is for them to choose which type of Job they would like. The type of Job...
30
by: Neil Zanella | last post by:
Hello, Suppose I have some method: Foo::foo() { static int x; int y; /* ... */ }
12
by: Sunny | last post by:
Hi All, I have a serious issue regarding classes scope and visibility. In my application, i have a class name "TextFile", and also a few other classes like "TotalWords", "TotalLines" and etc..,...
1
by: Arpan | last post by:
A class file named "SecureDBWS.vb" exsting in C:\Inetpub\wwwroot\ASPX\Business folder has the following code: Imports System Imports System.Data Imports System.Data.SqlClient Imports...
8
by: gerry | last post by:
The PagerSettings.Visible property is not being handled properly by the GridView control. The value assigned to this property is not applied until after a postback. Simplest test : .aspx...
1
by: Chris | last post by:
Hi, i need to check on every page whether a user is logged or not. If yes, the theme must be changed. I first tried with the code here below (without class) but this works only for the...
0
by: CodeSpanker | last post by:
I have a class library that is COM visible as it is instantiated via webpage. V1 of this class library is live and has been installed on client machines so that when they navigate to...
8
by: shapper | last post by:
Hello, I am working with VS 2008 and created a Web Application Project. I added a class but whatever I do the class is not visible to my aspx pages or anywhere else. I then changed the...
8
by: Mayur H Chauhan | last post by:
All, For my knowledge, if I declare Class as follow, then it thows compilation error. Protected Class Book End Class Even same for...
2
by: buu | last post by:
So, I have my class library that contains multiple classes, but I would like to have only one of them to be visible outside the library... how?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.