Click here to Skip to main content
15,889,281 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Yes I am begging for and example of a SOAP client in C# Pin
N a v a n e e t h16-Dec-09 14:58
N a v a n e e t h16-Dec-09 14:58 
QuestionLogin Control Woes Pin
Richard Blythe15-Dec-09 11:17
Richard Blythe15-Dec-09 11:17 
AnswerRe: Login Control Woes Pin
Adam °Wimsatt15-Dec-09 11:46
Adam °Wimsatt15-Dec-09 11:46 
GeneralRe: Login Control Woes Pin
Richard Blythe15-Dec-09 11:51
Richard Blythe15-Dec-09 11:51 
GeneralRe: Login Control Woes Pin
Adam °Wimsatt15-Dec-09 12:30
Adam °Wimsatt15-Dec-09 12:30 
GeneralRe: Login Control Woes Pin
Richard Blythe15-Dec-09 13:11
Richard Blythe15-Dec-09 13:11 
QuestionRegular expression for the time format 'HHMMAMPM' Pin
chandra vempati15-Dec-09 10:01
chandra vempati15-Dec-09 10:01 
QuestionTime Out Issue.....Javascript inside of an ASP.net application Pin
PDTUM15-Dec-09 9:10
PDTUM15-Dec-09 9:10 
Good Morning,

I am trying to write a simple time out javascript to accompany an ASP.net application. The default time out for the application is 20 minutes. Currently, when it does time out, it reverts to an ugly error page. I would rather that it either logs the user off or simply sends him to the login or index page. Although I have found some very seemingly simple samples, I cannot get anything to work. I do not know if it makes a difference, but I am using an internal (<Iframe>) to rotate pages within a main page. I do not why that should make a difference since the session value is based on the session and not the page. Either way, I have tried posting the script on both the Main page that displays the frame and on the inserted frame page as well. It makes no difference. These are the two scripts that I have tried:

Style 1 is supposed to give the option to take the user to a new page if it is not responded to:

function warnuser()
{
if (confirm("There has been no activity for some time.\nClick 'OK' if you " +
"wish to continue your session,\nor click 'Cancel' to log out.\nFor your " +
"security if you are unable to respond to this message\nwithin 2 minutes you " +
"will be logged out automatically."))
{
//post the page to itself
document.location.href = "Main.aspx"
}
else
{
document.location.href = "Index.aspx"
}
}

Style 2 is simpler and simply posts a warning:

function SessionAlert()
{
alert("Your Session will time out in 19 minutes");
}
setTimeOut("SessionAlert", 1 * 60 * 1000);

I tried setting the second one for just a minute just to see if it would work. It doesn't. Following is the setting that is deployed on the web.config page in the ASP.net applcation (and it does time out in 20 minutes):

<sessionState mode="InProc" cookieless="false" timeout="20" />

Any assistance is greatly appreciated....Pat
AnswerRe: Time Out Issue.....Javascript inside of an ASP.net application Pin
Abhishek Sur15-Dec-09 9:32
professionalAbhishek Sur15-Dec-09 9:32 
QuestionAbout asp.net system slowdown Pin
leone15-Dec-09 6:06
leone15-Dec-09 6:06 
AnswerRe: About asp.net system slowdown Pin
Abhijit Jana15-Dec-09 6:22
professionalAbhijit Jana15-Dec-09 6:22 
AnswerRe: About asp.net system slowdown Pin
Abhishek Sur15-Dec-09 7:17
professionalAbhishek Sur15-Dec-09 7:17 
QuestionQuestion about writing a conditional SQL statement Pin
James Shao15-Dec-09 4:28
James Shao15-Dec-09 4:28 
AnswerRe: Question about writing a conditional SQL statement [modified] Pin
dan!sh 15-Dec-09 5:00
professional dan!sh 15-Dec-09 5:00 
GeneralRe: Question about writing a conditional SQL statement Pin
James Shao15-Dec-09 12:43
James Shao15-Dec-09 12:43 
GeneralRe: Question about writing a conditional SQL statement Pin
James Shao15-Dec-09 15:50
James Shao15-Dec-09 15:50 
GeneralRe: Question about writing a conditional SQL statement Pin
dan!sh 15-Dec-09 17:06
professional dan!sh 15-Dec-09 17:06 
QuestionXPATH problem Pin
Rohit16db15-Dec-09 3:22
Rohit16db15-Dec-09 3:22 
AnswerRe: XPATH problem Pin
Abhishek Sur15-Dec-09 10:30
professionalAbhishek Sur15-Dec-09 10:30 
QuestionPage updating Pin
#realJSOP15-Dec-09 0:59
mve#realJSOP15-Dec-09 0:59 
AnswerRe: Page updating Pin
Eduard Keilholz15-Dec-09 1:08
Eduard Keilholz15-Dec-09 1:08 
GeneralRe: Page updating Pin
#realJSOP15-Dec-09 3:14
mve#realJSOP15-Dec-09 3:14 
AnswerRe: Page updating Pin
dan!sh 15-Dec-09 1:27
professional dan!sh 15-Dec-09 1:27 
GeneralRe: Page updating Pin
#realJSOP15-Dec-09 3:10
mve#realJSOP15-Dec-09 3:10 
GeneralRe: Page updating Pin
dan!sh 15-Dec-09 3:28
professional dan!sh 15-Dec-09 3:28 

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.