Jump to content

Sharing variables between users?


SinnerSmile
 Share

Recommended Posts

Hello, gentlemen.Can you give me a quick tip about how can i achieve some server side things.Truly i just don't know what i need to learn.What i need, is to be able to send value of some JS variable of user1 to the same JS variable of user2. Value need to be send from user1 if user1's value changed, and user2's function must start as soon as he receives this value.How can i achieve this value transferring between users of my page.Am I moving in right direction with learning ASP.NET Web Pages, or i totally misunderstood their purpose?

Link to comment
Share on other sites

You'll need to use a database or something else to store the values that both users would have access to. One user wouldn't have access to the other user's session, so you can't store it in the session. The second user would periodically need to check for updates from the server via ajax, and when it gets an update then you can respond to it.

  • Like 1
Link to comment
Share on other sites

Databases are separate from programming in general. Databases use a different language to interact with them, namely SQL. You'll need to learn enough SQL to be able to use the database. You should be able to find several tutorials about server-side languages and databases.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...