Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to execute the the code under "/_layouts/Signout.aspx" on my Sharepoint page without any redirection and remaining on same page .Can i use the page viewer webpart and call the code ? or is there any other way ?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I think your best option is a tiny bit of jQuery code to asynchronously call the SignOut page...

$.ajax({
  url: "/_layouts/SignOut.aspx"
}).done(function() {
  alert('user signed out!');
});

(Omit the .done() bit if you don't need it.)

share|improve this answer
1  
Clever idea ! +1! –  Francois Verbeeck Jan 20 '13 at 13:00
    
Thanks this is good way of doing.Anyways i added a page viewer webpart and set the URL to "layouts/Signout" and then set the height width of page viewer to 1 px.This too worked for me . . –  Nikhil Jan 24 '13 at 16:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.