Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NETAjax
hi i wants to show the Ajax model popup extender after session time out along with login credential on model pop up means Username,Password and Login button to once again login after session time out...
 
please provide a solution
 
thanks in advance
Posted 24-Sep-12 2:25am
wings_1.2K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can set the targetcontrolid to a dummy hidden button.  Then you can use YourModalId.Show() in page_load to show it.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Other than continously polling to see if the Session variable is valid, what you can try doing is let the session expire when it expires and just check for the validity of session first when the client request is recieved after the timeout, if the session is invalid, just do a modalpopup.show(). Should work.
  Permalink  
Comments
challengeTo at 24-Sep-12 8:49am
   
any sample code
gladiatron at 24-Sep-12 8:53am
   
if (Session["WhateverYourSessionNameIs"] == null) { modal.Show(); } you can try putting piece of code in page_load event handler. Let me know if it works.
challengeTo at 25-Sep-12 0:14am
   
ok sir i will try
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

1. Add
<meta http-equiv="refresh" content="60"> </meta>
tag to page header and set refresh time as per your session time out + one or two seconds more (Google how to do this programatically instead of hardcoding of "Content=60")
 

2.In the page load check the Session avalible or not, if not ModalPopup.Show()
Page will get refresh after session time out and your ModalPopup will appear.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Guruprasad.K.Basavaraju 446
1 Sergey Alexandrovich Kryukov 360
2 Shai Vashdi 318
3 OriginalGriff 265
4 Peter Leow 171
0 Sergey Alexandrovich Kryukov 9,109
1 OriginalGriff 5,290
2 Peter Leow 4,010
3 Maciej Los 3,535
4 Abhinav S 3,263


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 24 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid