C# - Clear All Regions / Views On Prism 4 (Silverlight) Logout?
Feb 21, 2011
I have an 2 regions in my silverlight application leveraging prism 4 and unity main shell view,
the Authenticated region and Non-authenticated region, and a menu item.
Within the authenticated region, there are a lot more sub regions depending on the view injected into it.
On load of the application, I will be presented with the login screen "Non-authenticated region", when login, I will be presented in the Authenticated region.
When I click on the logout button on the menu, I will again be presented with the login view.
But when I login for the second time, my existing view loaded within the authenticated region is still there.
I tried the following code on logout, to remove all views from that region, but the views retrieved from the container is still the existing view..
var regions = this.RegionManager.Regions;
foreach (var region in regions)
{
if (region.Name == this.AuthenticatedRegionName)
{
var views = region.Views;
foreach(var view in views)
{
region.Remove(view);
}
}
}
I am actually getting some region key not found error when I call request navigate for some reason, but I think the main issue is with the container.
I am having a probem when logout from my website.When i copy the URL page which is the page after login,and paste it again in browser,i can direct it to the page even though i alr logout. I not using any buit in asp control,and the logout button link that i create is place at Master Page.
Need the code for the login /logout in my sample project and how to attin logout in the all pages. dont mistake me as i am learning (fresher) the asp.net 2005
i want to know when account logout without logout button click. actually i want to manage dashboard. with some events like login, logout with it's activity date and time. so if any user login so i will entry for login. and if any user direct close browser so how can i manage logout entry in database.
I have create user wizard control and i put validation control for all field but when i close user control that validators dint clear in firefox or but clear in IE
I am learning MultiView control.Here are question:I added 5 views in the MultiView but all views are tight together. I can not drag and drop another control such as text boxes or labels into view area.
I have an MVC view that contains a number of partial views. These partial views are populated using partial requests so the controller for the view itself doesn't pass any data to them. Is it possible to reload the data in one of those partial views if an action was triggered in another? For example, one partial view has a jqGrid and I want to refresh the data in another partial view when a user selects a new row in this grid. Is there a code example for this scenario (in C#) that I can look at to see what am I doing wrong? I am using ajax calls to trigger a new request but non of the partial views are refreshed so I am not sure if the issue is with the routing, the controller,
I am trying to create in a partial view a Logout link. What i have now:
[Code]....
and my Html Action link from the partial view
[Code]....
When i press the logout link, it redirects me to [URL], where i have no view, so i get a "page not found" error. How can i make the logout link to redirect to home page?
I need to logout on close page or on close browser ... as usual ...but by default ASP Membership wont do it ...How to make logout when I just leave my site
I can't get my logout link to work. Everytime I click the logout button, it appears that nothing happens. I have set the url to change, and that will work, but it will not log the user out. Is there another setting I am missing? Here is my login view:
I have this method, but the javascript never executes:
Protected Sub Logout(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LoginCancelEventArgs) FormsAuthentication.SignOut() Session.Clear() Me.Page.ClientScript.RegisterStartupScript(Me.GetType(), "alertScript", "facebook_logout();", True) End Sub
I have a web page in that page I'm using 3 frame set one for heading, 2nd one for left side navigation and 3rd frame for main page. When i click left side navigation automatically main page will be displayed.
My problem is i have a Log out button in frame one(head page).when i click the logout button the frame one gets logout and displays the login page. frame 2nd and 3rd still exist i want to close all the frame and displays a complete login page in the browser.
I have Web Application in asp.net. Where I am maintaining Session for every User. And every Time I got logout in Approx 2 min. I tried to increase this time through web Config File upto 60 min but it is not working For me and I m getting same problem.
I have created A class file For maintaining session.I am Using This Code.
public static void createSession(System.Web.SessionState.HttpSessionState session) { Session = session; }
This is my class file code.
And I am calling this function in login Page load like this.