私はチャットをプログラミングしています。基本的にTextBox
、現在会話中のすべてのユーザーを表示したいウィンドウ()がありますが、データベースは使用したくありません。
したがって、アクティブユーザーのテーブルを、更新時に消去されない永続的な場所に保持する必要があります。
私はセッションを調べました。ただし、有効期限が切れており、アクティブユーザーの配列をそこに保持できません。アプリケーションオブジェクトも調べましたが、これで私のジレンマを解決できるようです。でも:
私が呼ぶと言う
String[] users = new users String[1000];
Application['users'] = users;
私のPage_Load()
方法では、新しいユーザーをそのテーブルに格納できることを確認しますが、各ページの読み込みによってテーブルが上書きされ、常に1人のユーザーのみが表示されますが、線に沿って何かを実装するisset()
ことで解決できると思います。