Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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

1. Add
C#
<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.
 
Share this answer
 
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.
 
Share this answer
 
Comments
wings_ 24-Sep-12 8:49am    
any sample code
I.explore.code 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.
wings_ 25-Sep-12 0:14am    
ok sir i will try
SQL
You can set the targetcontrolid to a dummy hidden button.  Then you can use YourModalId.Show() in page_load to show it.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900