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.

View 2 Replies


Similar Messages:

Web Forms :: Clear (Delete) Cookie After Logout?

Aug 18, 2015

How i can clear cookie browser after logout in Asp.Net because before into i saved password?

View 1 Replies

State Management :: Clear Session Id On Logout Click?

Nov 25, 2010

I am using master page and i use session id to identify coming user before navigation

i have a link button to logout ..this link button only will navigate to login page

once navigated if i click back i am still able to browse the page

clickin logout button not cleanin the session? how to avoid page click back?

or how to clear session id when user click logout?

View 7 Replies

Clear Data In Views Of Multiview

Oct 5, 2010

I created a asp.net survey program in which there is a multiview to store different questions and answers.

There are 5 views in a multiview. Each view has varies controls, such as text boxes, dropdown lists, check boxes.

Every time, once user move to next customer, I want to clear all data within 5 views and then start over.

Is there a easy to do it?

View 3 Replies

Security :: Clear Cache After Logout Button Link Is Press?

Feb 12, 2011

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.

View 1 Replies

Web Forms :: Clear Data In Views Of Multiview?

Oct 5, 2010

I created a asp.net survey program in which there is a multiview to store different questions and answers.

View 3 Replies

State Management :: Create A Logout Page With Clear Session And Cookies?

Nov 20, 2010

how to create a logout page that clears the session and cookies??? using c# .net...

View 5 Replies

How To Create Webparts Controls For Sharepoint 2007 In Delphi Prism

Jun 16, 2010

can i create webparts controls for Sharepoint 2007 in Delphi Prism? If yes, how?

View 1 Replies

Web Forms :: Use Regions In ASPX Pages?

Feb 5, 2010

is there any alternative to use regions in ASPX pages?

View 6 Replies

Social Networking :: How To Fade (change) Some Regions On Google Maps

May 7, 2015

How to chnage the google map color only outside of the circle

like this [URL] .....

View 1 Replies

Security :: Login / Logout Code - Attain Logout In The All Pages?

Oct 13, 2010

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

View 2 Replies

Social Networking :: Logout From Facebook Automatically When Logout From Website In C#

Feb 22, 2013

I want to logout from facebook automatically when i am logging out from my website..

I have integrated facebook authentication in my website using your code.

But I am not able to logout from facebook once login...

View 1 Replies

C# - Know When Account Logout Without Logout Button Click?

Mar 3, 2010

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.

View 2 Replies

Web Forms :: Closing User Control - Validator Does Not Clear In Firefox Or But Clear In IE?

Oct 27, 2010

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

View 3 Replies

Added 5 Views In The MultiView But All Views Are Tight Together?

Sep 28, 2010

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.

View 15 Replies

C# - .NET MVC Partial Views And Routing - Using Ajax Calls To Trigger A New Request But Non Of The Partial Views Are Refreshed

Mar 9, 2010

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,

View 1 Replies

What Is Difference Between Session.Clear() Versus Session.Contents.Clear()

Jan 5, 2011

What is difference between Session.Clear() vs. Session.Contents.Clear()?

I want to clear all the Session variables.

View 1 Replies

Partial Views / How To Implement Partial Views

Jun 16, 2010

i want to implement partial views in asp.net

View 1 Replies

MVC :: How To Add A Logout Link

Feb 18, 2010

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?

View 2 Replies

How To LogOut On Closepage

Mar 3, 2010

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

(FormsAuthentication.SignOut();
HttpContext.Current.Session.Abandon();)

btw got problem on logout button.
here is a code on page render to check if user authorization=true I setup "authorezated panel with logout button"

protected void Page_PreRender()
{
if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated)

[code]...

View 1 Replies

Can't Get Logout Link To Work

Apr 11, 2010

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:

Code:

[code]....

View 2 Replies

Execute Javascript On Logout?

Apr 11, 2010

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

View 10 Replies

How To Logout The Frameset In Page

Apr 4, 2011

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'm not using link button...

I'm using Button(Asp.net)...

I need c# code only....

View 1 Replies

How To Implement Logout Functionality In C#

Nov 13, 2010

how can i implement logout feature on my page so that user is redirected to a new page and is not allowed to view previous page.

View 3 Replies

Session Logout In Every Two Minutes?

May 28, 2010

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.

BusinessClasses.SessionHandler.createSession(Page.Session);

Then After I am Checking In everyPage.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved