How to logout the frameset in asp.net page
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 But开发者_如何学编程ton(Asp.net)...
I need c# code only.....
can any one please help me......
If your logout button is a link, simply set the target to "_top".
<a href="/myapp/logout" target="_top">Logout</a>
You can do the same if it's a button in a form (though that usage is deprecated). If you are using a form, I'd suggest changing it to a link.
<form action="/myapp/logout" type="POST" target="_top">
<button type="submit">Logout</button>
</form>
精彩评论