Click here to Skip to main content
15,890,579 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: web config in asp.net 2.0 Pin
Christian Graus16-Jun-08 2:24
protectorChristian Graus16-Jun-08 2:24 
Questionpagemethod does not render script execution Pin
Rritesh Ravlani16-Jun-08 0:08
Rritesh Ravlani16-Jun-08 0:08 
Questionhow to remember password in login page . Pin
deepthy.p.m15-Jun-08 23:47
deepthy.p.m15-Jun-08 23:47 
AnswerRe: how to remember password in login page . Pin
varshavmane16-Jun-08 0:50
varshavmane16-Jun-08 0:50 
GeneralRe: how to remember password in login page . Pin
deepthy.p.m16-Jun-08 1:36
deepthy.p.m16-Jun-08 1:36 
GeneralRe: how to remember password in login page . Pin
varshavmane16-Jun-08 1:53
varshavmane16-Jun-08 1:53 
AnswerRe: how to remember password in login page . Pin
Christian Graus16-Jun-08 2:25
protectorChristian Graus16-Jun-08 2:25 
QuestionProblem with Keep me Logged in. Pin
varshavmane15-Jun-08 22:51
varshavmane15-Jun-08 22:51 
Hello All,

I am working in ASP.NET 2008 (C#). I have to keep user logged in till he logout's. I did the following but its not working in all Pages. Specially on that page where I have used Web Parts.

function KeepmeLoggedIn()
{
if ('<% =keepmeloggedin %>' != '')
{
var sessionTime = (10 * 60000) - 30000;
window.setInterval('window.location.reload()',sessionTime );
}
}

Above Function is call in the body tag of Master Page, something like this:



In code Behind of Master Page:

public string keepmeloggedin = "";

protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["Collabs"] != null)
{
HttpCookie cookie = Request.Cookies.Get("Collabs");
keepmeloggedin = cookie.Values["keepmeloggedin"].ToString();
KeepMeLogedIn.Text = keepmeloggedin; //KeepMeLogedIn is TextBox
KeepMeLogedIn.Visible = false;
}
}

On Login User Control I have this:

If chkKeepLoggedIn.Checked Then
Dim cookie As New HttpCookie("Collabs")
Response.Cookies.Add(cookie)
cookie("keepmeloggedin") = "true"
Response.Cookies("Collabs").Expires = DateTime.Now.AddDays(15)
Else
Dim cookie As New HttpCookie("Collabs")
Response.Cookies.Add(cookie)
cookie("keepmeloggedin") = ""
Response.Cookies("Collabs").Expires = DateTime.Now.AddDays(15)
End If


Above code works fine sometimes and sometime it doesnt.

Please help me...

Thanks in advance...
AnswerRe: Problem with Keep me Logged in. Pin
Ravi Sant3-May-11 0:23
Ravi Sant3-May-11 0:23 
QuestionCrosstab Problem Pin
SreejithAchutan15-Jun-08 22:45
SreejithAchutan15-Jun-08 22:45 
AnswerRe: Crosstab Problem Pin
Ravi Sant3-May-11 0:25
Ravi Sant3-May-11 0:25 
Questionhow to fill value in textbox in panel Pin
Sneha Bisht15-Jun-08 22:44
Sneha Bisht15-Jun-08 22:44 
AnswerRe: how to fill value in textbox in panel Pin
Masood Kochi,SSF15-Jun-08 23:26
Masood Kochi,SSF15-Jun-08 23:26 
GeneralRe: how to fill value in textbox in panel Pin
Sneha Bisht16-Jun-08 0:05
Sneha Bisht16-Jun-08 0:05 
Questionhow to download a file Pin
Nika Asgari15-Jun-08 22:38
Nika Asgari15-Jun-08 22:38 
AnswerRe: how to download a file Pin
Masood Kochi,SSF15-Jun-08 23:32
Masood Kochi,SSF15-Jun-08 23:32 
AnswerRe: how to download a file Pin
Ravi Sant3-May-11 0:26
Ravi Sant3-May-11 0:26 
Questionimage compress Pin
pradeep kumarappagari15-Jun-08 22:11
pradeep kumarappagari15-Jun-08 22:11 
AnswerRe: image compress Pin
Ravi Sant3-May-11 0:27
Ravi Sant3-May-11 0:27 
QuestionSerial Port on Web Pin
caradri15-Jun-08 22:05
caradri15-Jun-08 22:05 
Questioncreate dynamic dropdown Pin
Member 387988115-Jun-08 20:37
Member 387988115-Jun-08 20:37 
AnswerRe: create dynamic dropdown Pin
Masood Kochi,SSF15-Jun-08 23:40
Masood Kochi,SSF15-Jun-08 23:40 
AnswerRe: create dynamic dropdown Pin
Ravi Sant3-May-11 0:28
Ravi Sant3-May-11 0:28 
QuestionImporting Contacts from Mail Clients in ASP.net Pin
sukkureddy15-Jun-08 20:15
sukkureddy15-Jun-08 20:15 
AnswerRe: Importing Contacts from Mail Clients in ASP.net Pin
Christian Flutcher15-Jun-08 20:18
Christian Flutcher15-Jun-08 20:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.