Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










JQuery :: How To Handle Session Expiration In Modal Window


I am having an aspx page page1.aspx with a button button1. Onclick of button1, a modal window popup is displaying using jquery.

The modal popup is displaying another page page2.aspx . I have appended the following line in the load event of all aspx pages to handle the session expiration.So that on expiration of session, it will automaticaly redirect to sessionexpired.aspx page.

Response.AppendHeader(
"Refresh",
Convert.ToString((Session.Timeout * 60) + 10) +
";URL=SessionExpired.aspx");


View 6 Replies (Posted: Jun 24, 2010 04:47 AM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Handle Facebook Session Expiration?
am a ASP.NET developer using Facebook Developer Toolkit to develop a facebook flash application with flash developer.When the user plays the game for a certain period of time, there are chances that the facebook session expires and I can't call any Facebook API for processing as a result.

Posted: Jan 27 10 at 8:22

View 2 Replies!   View Related
Web Forms :: Session Timeout In Modal Window?
I have one modal popup window in which I am loading some event, after session timeout occurs, page in the modal pop window redirects to login page.

What I want achieve is, On session Expiration modal window should disappear and parent page should be redirected to login page.

Posted: Dec 30, 2010 09:17 AM

View 2 Replies!   View Related
C# - Session Transfer Between Window And Modal Dialog?
I have a parent window from which i open a modal dialog on button click. In WinXP with IE8 it works just fine, but in Win7 with IE8, upon opening the modal dialog it brings me to the login screen. If i enter my credentials, close the dialog and open it again, it works.The explanation i figured out is that the session isn't transfered between parent and child.The modal is opened with javascript window.open function.I don't want to store the credentials in a cookie and then read it in my modal because it's a security no-no. Is there an explanation why this is happening in Win7 and not in XP and is there a resolution for this issue?

Posted: Oct 18 10 at 7:38

View 1 Replies!   View Related
Web Forms :: Session Expires When A Modal Window Is Opened?
I have Page1 having Button1.

Page2 havingButton 2 and an ascx control UC1. UC1 has a Button 3. Page2 is a modal dialog (window.showModalDialog )

on Click of Button1open Page2(modal dialog).

Page2 has UC1. UC1 has a button B3. On click of B3,instead of directly going to B3_click event, another post back happens. Thereafter opens login.aspx in another browser( It is losing Session containing UserDetails as well as other session details).

now even If I continue entering Username and password, page2 reloads again in the new browser.

I am totally lost.

1) I do not know why UC1 button click makes another postback and thereafter opens up into another page losing all the sessions!!

I want to retain teh sessions till i go back to page1.

Posted: Jun 04, 2010 09:50 AM

View 6 Replies!   View Related
MVC :: Partial View In Modal Dialog (using Ajax/jQuery) - How To Handle Invalid Modelstate
After wading through quite a few articles on creating modal forms (using partial views and jquery) I got things working fine for my login....as long as you enter a valid login though!

What I did:

Created a partial view containing my login form.

In my action controller, the get action just return a PartialViewResult, which get dealt with by a bit of jQuery in my master:[Code]....

Like I said this works fine. Now the post action of my login check if it's a valid login, and if so send the user to the passed returnurl or the home page.

However, if the validation fails, I now return the partial view again, which work , but the partial get displayed by itself instead of rendering in the modal form that was opened by jquery.

Posted: Mar 18, 2010 05:36 AM

View 4 Replies!   View Related
JQuery :: How To Pass Parameters To Modal Window
I have a webpart in a page in which there is a gridview(which shows list of customers). When I click on a link button in gridview, I would like to popup a JQuery modal window and fill the popup(this contains textboxes, then a gridview which contains mapped systems for thet customer, and another gridview which contains list of configured reports for that customer)with the details based on the customer name(link) clicked. Here I need to pass the customer Id and customer name parameters based on which I can fill the Jquery modal window.

pass parameters to JQuery modal window in order to fill the contents inside it?

Posted: Aug 24, 2010 06:14 AM

View 1 Replies!   View Related
Jquery - How To Write A File To The Response Stream And Have A 'Working' Modal Window Show/hide
I need to to export a file to the user. It takes 1-2 min to generate the file so I'd like to have the page go into a kind-of modal mode with a layover on the page and a 'Working' spinner showing. The problem is I can't make the modal stuff go away after Save File dialog is closed.

How can I remove the layover after the dialog is done?

Posted: Feb 15 at 19:09

View 1 Replies!   View Related
MVC :: Show Session Expiration Time To User?
I have a scenario in my application thatI need to display session expiration time to the user. I set session expiration as 30 minutes in my application, 5 minutes before the session expiration, I need to show message to user that the session is going to expire.

How can I will do this implementation, I am using VS 2010 + MVC 2.0 + JQuery.

Posted: Jan 05, 2011 06:11 AM

View 3 Replies!   View Related
Setting Alternative Session Expiration Times?
I want a specific session variable (in my case Session["level"]) to expire either on the normal 20 min. timer or at 19:30 every day. Because I change a value in my database everyday at 19:30 and I want this session variable to be related to that value. Is this possible?

Posted: Jan 15 at 10:39

View 1 Replies!   View Related
Html - Setting Path And Expiration For Session Cookie
Anything I have tried didn't work. Currenly I have following code to change asp.net session cookie expiration date and path, but asp doesn't want to listen to me. I sends same cookie in Set-Cookie header two times sometimes, sometimes it sends it's default cookie ignoring path and expiration date, sometimes it sends everything as expected, and sometimes it doesn't send Set-Cookie at all. What should I do.

My code in Global.asax

protected void Application_PreRequestHandlerExecute(Object sender, EventArgs e)
{
/// only apply session cookie persistence to requests requiring session information
if (Context.Handler is IRequiresSessionState || Context.Handler is IReadOnlySessionState)
{
var sessionState = ConfigurationManager.GetSection("system.web/sessionState") as SessionStateSection;
var cookieName = sessionState != null && !string.IsNullOrEmpty(sessionState.CookieName)
? sessionState.CookieName
: "ASP.NET_SessionId";
var timeout = sessionState != null
? sessionState.Timeout
: TimeSpan.FromMinutes(20);
/// Ensure ASP.NET Session Cookies are accessible throughout the subdomains.
if (Request.Cookies[cookieName] != null && Session != null && Session.SessionID != null)
{
Response.Cookies[cookieName].Value = Session.SessionID;
Response.Cookies[cookieName].Path = Request.ApplicationPath;
Response.Cookies[cookieName].Expires = DateTime.Now.Add(timeout);
}
}
}

Posted: Mar 25 10 at 7:35

View 1 Replies!   View Related
Setting Cookie Expiration With ASP Classic To Session Sharing Solution
I'm implementing the session sharing structure from this link for an ASP classic site to begin the gradual conversion process to ASP.NET. I'm trying to extend the cookie expiration time so that users do not get signed out of the site when the session expires. At the place where the cookie is created in SessionPage.cs I've added the line in the CreateNewSessionCookie() method: cookie.Expires = DateTime.Now.AddDays(14);

Now this works fine, however, it only works if the user first visits an ASP.NET page, and then visits the ASP classic pages. It doesn't work if visiting an ASP classic page first (looking at the cookie through firefox confirms that different expiration values are given based on if I visit an ASP or ASP.NET page first.) I'm still a bit fuzzy on the mechanics behind this implementation as I don't have a complete understanding of session and cookie handling. However, I would have thought that the VB6 SessionMgr object is calling the SessionUtility DLL, and thus is using the same code to issue the cookie. I have re-registered the SessionUtility using gacutil, and re-exposed it using regasm. How else is the cookie being issued when a user accesses an ASP classic page? How can I change the expiration time?

Posted: Jun 25 10 at 6:13

View 1 Replies!   View Related
Security :: How To Redirect The User Automatically To Login Page After Session Expiration
How i redirect the page to Login page automaticallyif session Expires .

Posted: Mar 10, 2010 10:15 AM

View 7 Replies!   View Related
Javascript - .NET Cross Domain Modal Window (window.showModalDialog) - Parameter Value Always "undefined"?
I have two webpages, parent page .aspx and child page .html.
On parent page I have JavaScript function for invoking child page as modal window via window.showModalDialog.

function viewCourseModal(url) {

var sPars = SomeParameters();
var returnedValue = window.showModalDialog(url, "", sPars);[CODE]...

So when I launch parent window and invoke child modal window, parameter with "someValue" gets returned to the parent window (to modalReadyForTest control) upon clicking the button Button1.It works fine when I have both parent and child pages on the same domain. When I have them on different domains, value of the parameters does not get passed and instead it is always "undefined".Is there any way to have modal window from different domain returning parameter value to parent page? Can those cross domain issues be solved at all or should I try completely different approach?

Posted: Aug 27 10 at 20:29

View 1 Replies!   View Related
Web Forms :: How To Pass A Session Variable From Child Window To Parent Window
I have a page (parent)that open up a popup window using window.open javascript. User will then work on the popup window and the result will be stored in a session variable. When the user close the popup window, how can I put the value of the session variable back to the server control textbox of the parent window?

Posted: Feb 22, 2011 09:41 AM

View 3 Replies!   View Related
State Management :: Session State Expiration After Application Pool Recycle?
Allwe have a global ships position tracking websitewhich runs smoothly until IIS application pool recycles.When there is workerprocess recycling looks like session state expires as a result i loose all session data and whencustomer clicks refresh button he is redirected to login page.

In web.config Session state mode is set to InProc so i changed it to State Server but to my luck i have MAP object which is not serialiazable which is causing the maps from notappearing on the website.I tried adding serializable attribute to the object class but still not succesfull.Our website is accessed by our customers whose count is more than 1000.

Changing the session state mode from InProc to StateServer can really slow down the response time so
Is it good to go further fix the serailizable issues and move to state server?.

Is there any way I can retain my session data when application pool recyles?..

Stopping Application pool from recycling may not be a good idea considering health factor of web server.

Posted: Nov 01, 2010 05:29 PM

View 8 Replies!   View Related
Javascript - Passing Data Between A Parent Window And A Child Popup Window With JQuery
I have the following HTML

<tr>
<td class="label" valign="top">
Affiliate Party
</td>
<td class="field">
<input type="hidden" name="ctl00$MainContent$ExternalAccountAttributes$AffiliatePartyId" id="AffiliatePartyId" />
<input name="ctl00$MainContent$ExternalAccountAttributes$AffiliatePartyName" type="text" id="AffiliatePartyName" class="PartyLookup" />
</td>
</tr>

and the following Javascript/jQuery

$(".PartyLookup").after("<img src='Images/book_open.png' class='PartyLookupToggle' style='padding-left:4px;' />");
$(".PartyLookupToggle").click(function () {
window.open("PartySearch.aspx", "PartySearch", "width=400,height=50");
return false;
});

I need to be able to flag ANY PartyId input field with class="PartyLookup" so that it will modify the DOM and include the image next to the input field. The popup window returns data to populate both the hidden and text fields, but since the click() is generic I need to pass it the ID of the input field.

Posted: Dec 3 10 at 21:58

View 2 Replies!   View Related
JQuery :: .Net Custom User Control Buttons (events) Not Firing In Jquery Modal Popup?
I have a custom control, that has takes some information from user and submit to the database. it is working fine in normal aspx pages. but when i display that custom user control in jQuery modal popup. The events does not fire or lets say the data is not submitted to the database.

Posted: Oct 28, 2010 03:07 PM

View 3 Replies!   View Related
JQuery :: JQuery Modal Not Firing When Called From Server Side?
I am using this basic jQuery modal window example: http://www.ericmmartin.com/projects/simplemodal-demos/

It works fine if I set it up to click a standard HTML button. However, I want to use this as an action dialog window so I need to automatically open it via code-behind. I wrapped the jQuery like this: function launchIt() {

Posted: Jun 23, 2010 12:51 PM

View 2 Replies!   View Related
Web Forms :: What Value Can Pass For Window Handle
I have a 3rd party ActiveX control built in VB6 which I need to use in an ASP.NET web application. But as the ActiveX is using window handles as parameters to method calls, I am not sure how to do that in a web browser as we do not have windows controls and hence no handles in web applications.

The ActiveX provides methods like: long AddObject (long * obj_handle, long window_handle, BSTR dev_name, short obj_id)

what value can I pass for window handle?

As a workaround, I created a Windows Forms Control Library project, placed this VB6 ActiveX control on it and provided wrapper public methods which internally calls methods of ActiveX control. Which solves the handles problem as now I can supply the window handle. This Windows control works fine when placed on a Windows Forms client. Now I placed this winform control on asp.net page like this:

But the browser (IE) does not load the Winform control and shows empty area with a small icon probably because it is unable to load the dependent assemblies as MyWinFormsProject.dll is referencing ActiveX assemblies.

Now the issue is I can specify only 1 dll above so how to specify multiple assemblies. For this I used ILMerge and merged the dependent assemblies and MyWinFormsProject.dll to create a single dll named as MyMergedProject.dll and used it like this:

But still it does not solve the problem and IE shows empty area and does not load the winform control.

Posted: Jun 24, 2010 12:41 PM

View 7 Replies!   View Related
How To Display An Image In A New Window And Handle The Click
I have a follow-on question to How to display an image based on SelectedValue in a GridView?

What I would really like to do is have a ViewImage button on my GridView control so that when that is clicked, the image is displayed on a new page in a new browser window. How would I do that? I'm thinking perhaps do I need to create a

<asp:ButtonField>

How do I handle the click and how do I get the image to diplay on a new form in a new web browser window?

Posted: Nov 5 10 at 9:41

View 2 Replies!   View Related
JQuery :: ReCaptch - Jquery Ui Modal Dialog?
I would like to have acontact form which contains a reCaptcha, and have that form inside a jquery ui modal dialog.

All works well, except that I have a submit button for the form - which closes the modal dialog wether the recaptcha is valid or invalid.

I tried adding onClientClick="return false;" to the submit button, but it still posts back, and closes the dialog.

how do I remain inside the dialog ?

Posted: Sep 11, 2010 12:46 AM

View 3 Replies!   View Related
Response Redirect To New Window Modal?
I am new to ASP.NET, How to response redirect to new window modal?

Posted: Jun 6th, 2009, 10:30 AM

View 5 Replies!   View Related
Javascript - Window.open As Modal Popup?
I want open window.open as modal popup.

var features = 'resizable= yes; status= no; scroll= no; help= no; center= yes;
width=460;height=140;menubar=no;directories=no;location=no;modal=yes';
window.open(href, 'name', features, false);

I can use Window.ShowModelDialog(), but in my child window I am calling parent javascript method. That is not happening with ShowModelDialog().

function CallParentScript(weburl) {
alert(weburl);
if (weburl != null) {
var url = weburl;
window.opener.SelectUserImageCallback(url);
window.close();
return false;
}
}

If I use window.open(). I can call Parent javascript. But window is not modal. How to solve this? Can I write something in child popup to always top?

Posted: Oct 14 10 at 21:07

View 3 Replies!   View Related
AJAX :: How To Close An Modal Popup Window
how to close an modal popup window? I tried some samples , that said

modalpopup1.hide().

This one known, but i need how to close(or) fire an event onthe modal popup "X"button on top of modal popup right side?

If i click "X" button it closes the modal popup window. it is working properly.But in that time i need update on sql. So I need to execute some code in C# (or)javascript. So where i will write my code , and on which event occured at the time of "X" button clik in modal popup.

Posted: Oct 30, 2009 04:43 PM

View 1 Replies!   View Related
Passing Control Value To Modal Window And Capture It?
I have an ASP.NET page with C# code behind.On it I have a form ofasp:textboxes, asp:DropDownLists, and asp:Buttons. When the user clicks a button, I'd like the DropDownList's DataValueField to be passed to a modal window for use in executing a SQL sp.

I have the child page working with a sproc if I were to hardcode the parameter I described above. All I need is to be able to pass that DataValueField to a modal window for use there. No AJAX available, just ASP/C#

Posted: Nov 23, 2009 03:29 AM

View 2 Replies!   View Related
AJAX :: Modal Pop Up Not Opening JavaScript Window
I have a modal pop up window (Ajaxcontroltoolkit one) and inside that I am trying to open a normal Java Script new window.

ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1, this.UpdatePanel1.GetType(), "AnyScriptNameYouLike", "window.open('http://www.yourwebsite.com');", true);

But for some reason it does not open.

But it opens fine if I pu the same line of code in a button click event.

Posted: Feb 25, 2010 05:23 AM

View 5 Replies!   View Related
How To Keep An Ajax Modal Window Open After Postbacks
How to keep an ajax modal window open after postbacks?

The ajax modal window holds an panel that hold a server side controls that do a postbacks

to vaildate the user inputs/changes.

I want after each post back to keep the ajax modal window open.

Posted: Nov 07, 2009 11:26 AM

View 2 Replies!   View Related
C# - How To Pass Collection To Modal Dialog Window
I want to know, if its possible to pass collection between pages. I mean to say i have a client-side JavaScript modal dialog on which I want to use my collection. Earlier I was using Session[] to share the value, but its becoming evil for me, as it always displays the first value. Any change in value in not updated.

So whenever my pop up is displayed I want the collection to get moved to the Child dialog. From there, i will extract the Collection, do some stuffs and again return it to parent page, preventing postbacks and session management.

Posted: Jan 25 at 14:45

View 1 Replies!   View Related
Best Practice For Modal Window In Web Forms Application?
On a list page, clicking on one of the items brings up the details in a modal popup window which will have its own functionality (like validation, updating etc). What's the best practice to implement this (not looking for a hack). I see two options here:

Hide the details markup until a list item is clicked at which time, do a ajax request to get the details and populate and show the details section. Have the details section as a separate page by itself. On a list item click, show this page in a modal window (is this even possible?)

Posted: Feb 24 10 at 16:08

View 1 Replies!   View Related
Show A Modal Popup Window On Web Form?
I wanted to show a modal popup window on my Web form. I am using the ajax popup window and it is working fine. Currently I have it to show at the page load. But I have a new requirement, that I need to show the popup window only after user being in the page for 10 seconds. Is there any way for me to invoke the popup window after 10 seconds? I don't want to use a timer, because it is conflicting with the update panel I have in the form.

Posted: Dec 15, 2009 09:48 PM

View 3 Replies!   View Related
Creating A Modal Window On GridView Select In C#?
What's the best way to create a pop-up like modal window that shows upon clicking the Select button in GridView?

<asp:CommandField ShowSelectButton="true" ButtonType="Button" SelectText="Select Me" />

Also, bonus if you know how to implement this via jQuery.

Posted: Jul 3 10 at 1:55

View 1 Replies!   View Related
How To Make Modal Popup Window To Stay Visible
I have a popup window of course through the use of modalpopup extender that searches a record. In the popup window, I have two buttons - a search and a close button. Whenever, I click on the search buttton, the popup window immediately disappear. How am be able to make my modal popup window to stay visible even I click on the search button?

Posted: Apr 1, 2010, 04:09

View 2 Replies!   View Related
C# - Calling Modal Window From Secure Website Links?
I currently have a asp test site setup which when the user clicks on the login link it opens the standard asp.net login page (login.aspx) within a modal telerik RadWindow. I am calling this page using javascript and this works fine.

The challenge I have now is when a user clicks on a link within the page if that link points to a secure section the login screen loads in the main frame of the site vs. a pop-up. I realize why (aka my js funciton is not being called) my question is to work around this would the correct/acceptible approach be to call a method from each link/button that tests for user authenticaiton? If the user is authenticated then redirect to the page otherwise call the javascript funciton to open the window?

[code]....

Posted: Jan 28 at 21:01

View 1 Replies!   View Related
AJAX :: Modal Popup Window - Links / Tutorials?
I wish to do a modal popup window. I am new to AjaxControlToolkit. provide tutorial links explaining the necessary things to do this in a step by step manner.

Posted: Aug 11, 2010 01:33 AM

View 2 Replies!   View Related
Refresh Modal Popup Window - Reopen / Minimize?
In my web application I have a web form that has several button . When the user button a modal popup window is closed here i past modal popup window to refresh without having to close and re-open it. Is it possible to refresh a modal popup window without closing and re-opening it? and how to minimize i am using visual Studio 2005.

Posted: Sep 26, 2009 11:33 AM

View 2 Replies!   View Related
Web Forms :: Make Modal Popup In Center Of Window?
I'm using Modal Popup, when user click i need to get the window in center, irrespective of screen size. my screen size is 1280*780 so i adjust the x and y value in modal popup im getting the window in center,but alignment is changed on other screen size. how to make the modal popup in center in all size

Posted: Jan 17, 2010 02:43 AM

View 4 Replies!   View Related
AJAX :: Progress Indicator In Modal Popup Window?
I'm trying to use the modal popup window extender to display a'loading' icon when the user uploads a file.I'm using the following:

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);
function beginReq(sender, args)
{
// shows the Popup
$find(ModalProgress).show();
}
function endReq(sender, args)
{
// shows the Popup
$find(ModalProgress).hide();
}
//END --
// on the .aspx page
<script type="text/javascript" language="javascript" >
var ModalProgress = '<%= modalProgress.ClientID %>';
</script>
<asp:Panel
ID="pnlModal"
CssClass="modalPopup"
Style="display: none"
Width="233px"
runat="server" >
<img alt="Loading Icon" src="../images/redLoading.gif" />

The file is being uploaded, depending on the number of records this may take up to a minute.

</asp:Panel>

which I found on Berseth's site but I cannot get it to work. 'Null' error when it's trying to pop the window. Does anyone out here have another way to do this.

Posted: Jun 09, 2010 01:17 PM

View 5 Replies!   View Related
Open Modal Window When Click On Link Button?
How to open modal window when click on link button?

Posted: Jan 07, 2009 06:52 AM

View 3 Replies!   View Related
AJAX :: Modal Window Data Collection For GridView?
I have aGridView control which list a country name, has a drop down for aselected reason, and a check box column. I want to be able to dynamically add new countries. For purelyUI reasons I would like to have an add buttonbelow the grid and when clicked it opens a modal window.Once the countries are selected to addthe user hits okay and the grid is updated. Iwas looking for a way to handle this without the postback from the ok button in the modal window?

Posted: Oct 27, 2009 05:45 PM

View 3 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved