English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

my project requires me to do a chat application.
i have done a sign in page in ASP.NET,n i have a javascript chat aplication(without sign in page) separately.
how do i combine these two. in order to authenticate user 2 chat.

2007-03-10 17:40:27 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

The easiest way is to create a session variable on the log-in page, and then check for that session variable on the chat page. Like so:

Login page:
If login successful:

Session("UserName") = username

Chat page:
If Session("UserName") Is Nothing Then
//user is not logged in - redirect to login page

or if you're using c#
if(Session["UserName"]==null)
{
//redirect to login page
}

2007-03-10 17:48:24 · answer #1 · answered by Rex M 6 · 1 0

fedest.com, questions and answers