|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Warn user that session expired?How can I warn a user that their session has expired when they click on a
button etc? If the session is expired, then in the postback process, simply redirect
them to a custom session expired page which can explain what went wrong. Show quoteHide quote "NH" <N*@discussions.microsoft.com> wrote in message news:BFFCA39B-C17C-45B0-B1EB-A89D35CDB90C@microsoft.com... > How can I warn a user that their session has expired when they click on a > button etc? > > But that will result in information loss if say the user has some textboxes
fille dout etc. Is there a way to warn a user the session has timedout and not postback in that case? I dont think there is a way. Show quoteHide quote "SevDer" wrote: > If the session is expired, then in the postback process, simply redirect > them to a custom session expired page which can explain what went wrong. > > -- > > SevDer > http://www.sevder.com > > "NH" <N*@discussions.microsoft.com> wrote in message > news:BFFCA39B-C17C-45B0-B1EB-A89D35CDB90C@microsoft.com... > > How can I warn a user that their session has expired when they click on a > > button etc? > > > > > > > Session timeout is something that happens on server-side. Unless we hit
server, there is no way to find find timeout. "NH" <N*@discussions.microsoft.com> wrote in message But that will result in information loss if say the user has some textboxesnews:2B54B0D0-887B-4BB8-97F5-60DD57937663@microsoft.com... fille dout etc. Is there a way to warn a user the session has timedout and not postback in that case? I dont think there is a way. Show quoteHide quote "SevDer" wrote: > If the session is expired, then in the postback process, simply redirect > them to a custom session expired page which can explain what went wrong. > > -- > > SevDer > http://www.sevder.com > > "NH" <N*@discussions.microsoft.com> wrote in message > news:BFFCA39B-C17C-45B0-B1EB-A89D35CDB90C@microsoft.com... > > How can I warn a user that their session has expired when they click on > > a > > button etc? > > > > > > > yeah and the problem is that as soon as you hit the server the session is
re-set. Catch 22. Show quoteHide quote "Siva M" wrote: > Session timeout is something that happens on server-side. Unless we hit > server, there is no way to find find timeout. > > "NH" <N*@discussions.microsoft.com> wrote in message > news:2B54B0D0-887B-4BB8-97F5-60DD57937663@microsoft.com... > But that will result in information loss if say the user has some textboxes > fille dout etc. > > Is there a way to warn a user the session has timedout and not postback in > that case? > > I dont think there is a way. > > "SevDer" wrote: > > > If the session is expired, then in the postback process, simply redirect > > them to a custom session expired page which can explain what went wrong. > > > > -- > > > > SevDer > > http://www.sevder.com > > > > "NH" <N*@discussions.microsoft.com> wrote in message > > news:BFFCA39B-C17C-45B0-B1EB-A89D35CDB90C@microsoft.com... > > > How can I warn a user that their session has expired when they click on > > > a > > > button etc? > > > > > > > > > > > > > > > Well, you can do through JavaScript and another aspx page.
What you need to do is, make XMLHTTP call to the other aspx page, and in the aspx page, simply make a simple output. If the session exists, do Response.Write("OK"); and if it does not exist do Response.Write("NOTOK"); Also note that, you should not have any HTML on this aspx page, like no form no body but <%@ Page language="c#" Codebehind=" I think this will solve your problem. Show quoteHide quote "Siva M" <shiva***@online.excite.com> wrote in message news:%23MUZGDuEGHA.716@TK2MSFTNGP09.phx.gbl... > Session timeout is something that happens on server-side. Unless we hit > server, there is no way to find find timeout. > > "NH" <N*@discussions.microsoft.com> wrote in message > news:2B54B0D0-887B-4BB8-97F5-60DD57937663@microsoft.com... > But that will result in information loss if say the user has some > textboxes > fille dout etc. > > Is there a way to warn a user the session has timedout and not postback in > that case? > > I dont think there is a way. > > "SevDer" wrote: > >> If the session is expired, then in the postback process, simply redirect >> them to a custom session expired page which can explain what went wrong. >> >> -- >> >> SevDer >> http://www.sevder.com >> >> "NH" <N*@discussions.microsoft.com> wrote in message >> news:BFFCA39B-C17C-45B0-B1EB-A89D35CDB90C@microsoft.com... >> > How can I warn a user that their session has expired when they click on >> > a >> > button etc? >> > >> > >> >> >> > > Or simply have a hidden iframe which pings the server periodically. Then
the server can evaluate the session state and emit the javascript to display a message box. Show quoteHide quote "SevDer" <sevder@newsgroup.nospam> wrote in message news:OznrzMuEGHA.3700@TK2MSFTNGP15.phx.gbl... > Well, you can do through JavaScript and another aspx page. > > What you need to do is, make XMLHTTP call to the other aspx page, and in > the aspx page, simply make a simple output. > If the session exists, do Response.Write("OK"); and if it does not exist > do Response.Write("NOTOK"); > Also note that, you should not have any HTML on this aspx page, like no > form no body but > <%@ Page language="c#" Codebehind=" > > I think this will solve your problem. > > -- > > SevDer > http://www.sevder.com > A new source for .NET Developers > > > "Siva M" <shiva***@online.excite.com> wrote in message > news:%23MUZGDuEGHA.716@TK2MSFTNGP09.phx.gbl... >> Session timeout is something that happens on server-side. Unless we hit >> server, there is no way to find find timeout. >> >> "NH" <N*@discussions.microsoft.com> wrote in message >> news:2B54B0D0-887B-4BB8-97F5-60DD57937663@microsoft.com... >> But that will result in information loss if say the user has some >> textboxes >> fille dout etc. >> >> Is there a way to warn a user the session has timedout and not postback >> in >> that case? >> >> I dont think there is a way. >> >> "SevDer" wrote: >> >>> If the session is expired, then in the postback process, simply redirect >>> them to a custom session expired page which can explain what went wrong. >>> >>> -- >>> >>> SevDer >>> http://www.sevder.com >>> >>> "NH" <N*@discussions.microsoft.com> wrote in message >>> news:BFFCA39B-C17C-45B0-B1EB-A89D35CDB90C@microsoft.com... >>> > How can I warn a user that their session has expired when they click >>> > on >>> > a >>> > button etc? >>> > >>> > >>> >>> >>> >> >> > > |
|||||||||||||||||||||||