What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 42824 |  Welcome, Guest!   Register  Login
 Home > Forums > ASP.NET > give me coding for logout in asp.net ...
Reddysankark@Yahoo.Com

give me coding for logout in asp.net

Replies: 3 | Posted by: Reddysankark@Yahoo.Com on 4/27/2012 | Category: ASP.NET Forums | Views: 2973 | Status: [Member] | Points: 10  


hi,

give me coding for logout without using logout control

sankarreddy


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Dotnetrajanikanth
Dotnetrajanikanth  
Posted on: 4/27/2012 4:36:43 AM
Level: Starter | Status: [Member] | Points: 25

Private Sub LbtLogout_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbtLogout.Click


'Kill the user session.
Session.Abandon()

'Signing out of the website.
FormsAuthentication.SignOut()

'Redirect to the home page
Response.Redirect(FormsAuthentication.DefaultUrl)

End Sub


____________
www.flickr.com/photos/psdesigner/

Reddysankark@Yahoo.Com, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Oswaldlily
Oswaldlily  
Posted on: 4/27/2012 5:04:36 AM
Level: Starter | Status: [Member] | Points: 25

just inside logout button control include this:


Session["Username"]="";
Response.Redirect("../login.aspx");


If yu logout,this ll redirect to yur loginpage back..

Reddysankark@Yahoo.Com, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Somasundaram
Somasundaram  
Posted on: 4/27/2012 5:14:38 AM
Level: Starter | Status: [Member] | Points: 25

Session.Abandon()
Response.Redirect("Login.aspx");

Reddysankark@Yahoo.Com, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/24/2013 3:44:23 PM