How to press a button to hide the other browser's button in ASP.NET (button.Visible)

annapelican

New Member
Suppose we have two browsers opened, and two players are connected to each other playing the same game on 2 different browsers. The game state is recorded by Session variables. When the game is done, the last page pops up with 3 buttons, rematch, play with another player, and disconnect. How can I build a solution to give first come first serve opportunity for the first person to press any of the three buttons. So player 1 presses rematch button, under the event handler, it is going to make button2 and button3 invisible for player 1's session, but should also make player 2's button invisible as well. How can I allow player 1 to make player 2's button2 and button3 invisible? So to sum up, player 1 presses a button to hide 2 buttons, that forces player 2's buttons to hide. Player 2 has not made a move yet.
 
Back
Top