.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to clear history of a page when logout

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :ASP.Net

i am creating a web application,when a user clicks logout it clears the session and also succesfully logsout,but when i press back button on browser it again shows the user is loged in,how to avoid this

View Complete Post

More Related Resource Links

Adding table to a page, but the format lost when I use clear border



I added a table to a page, by default, the table layout is the light border. So, I add my content and the vertical align seems to set to the top. But when I changed it to clear border, the content of the table will set vertical align to center. Is there a way to change this back to top align but with the clear border. I don't think I can do this by what is available in the ribbon. Please advice.

error when logout my web page

sir i am usinng ajax roundcorners toolkit but when i logout my web page error occuers . error is:- Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'AjaxControlToolkit.RoundedCornersBehavior' cannot be converted to type 'AjaxControlToolkit.RoundedCornersBehavior'. Parameter name: instance

How to clear AsyncFileUpload if page revisited

Hello all,   just downloaded the latest Ajax toolkit and want to use AsyncFileUpload in my project. But the control keeps the path of previously uploaded file if page revisited again (in my case - a popup page). Is there any parameter can be set to clear the path box (it shows previous path in red). You know, the simple something like syncFileUpload.Clear() would of been nice! But it doesnt have it. Any work around? I tried to place it on page Init and set as New but didnt help.   Thanks in advance.   Nat    

logout problem(after logout when clicking on back button after logout still opens the previous page

I am using ASP.NET, the web page is abandoning and clear session when a user click logout link but they click the back button and it is still showing the previous page. How can it prevent the previous page after logout?on Logout.aspx load im using this code//=================//        Session.Clear();        Response.Buffer = true;        Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D);        Response.Expires = -1500;        Response.CacheControl = "no-cache";        //----- Second Technique : To Stop Caching of Secure Pages.        Response.Cache.SetCacheability(HttpCacheability.NoCache);        FormsAuthentication.SignOut();        if (Session["UserName"] == null)        {            Response.Redirect("login.aspx");        }       Session.Clear();         Response.Buffer = true;         Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D);         Response.Expires = -1500;         Response.CacheControl = "no-cac

page version history gives error: "value cannot be null. parameter key: name"

Hello, I'm have customized my homepage in SharePoint Designer 2010. I want to go back to a previous version, so I right click on the aspx file in sharepoint designer and choose "version history". When I do that I get this message: There was an error connecting to the server. The server error encountered is "Value cannot be null. Parameter name: key" What should I do in order to revert my aspx page to a previous version ?

View Page Content History

Hi Folks I have a page library in a publishing site that has major and minor versions. I can click on a pages context menu and select view history and it gives me a list of all the major and minor version along with what appears to be a snippet of the page content. The problem is that I cant view the historical version of a page in it entirety. If i click the date or context menu > view; I cant click the title like you can on a document and view the historical version. How do I see the complete page content of an old version of a page? David

Move page in Site Content and Structure alters revision history and makes old content available


This sounds bizzare, I tried it on an OOTB publishing site.

I have a page X in site A. Page X has version 1.0 and 2.0 approved and published, no minor versions anywhere. I choose to move page X to site B. Page X now has revision history version 1.0 (published and available) and version 1.1, which is exactly the same as version 2.0 but no longer visible to the outside world.

So the first problem is that moving a page makes a previously published and overwritten version of the page content available again. If I publish the page it goes to version 2.0, but I have to remember to do this. Also because I approve the page, my user id is associated with the publication of the content (which is sorta ok) but the original author of version 2.0 has now presumably been lost to the ether ... or the green swirling icon of death.

But I don't publish page X because I think "oops I meant to move page Y" and move it back to site A, without first publishing version 1.1. Now I have version 0.1 and 0.2. 0.1 matches the original version 1.0, and version 0.2 matches the original version 2.0, however the best bit is that the timestamps are such that version 0.1 is now checked in after version 0.2.

I then publish the page, I now have version 0.1 and 1.0, where 0.1 matches the original version

Clear History of an TextBox


Hi Together,

I've a problem with a TextBox in combination with the AutoCompleteExtender.

I'd like to delete the input history of the TextBox, because it covers the List of the AutoCompleteExtender or if this isn't possible to add the history to the List. 

I hope I made my problem clear.



Load Previous ASPX Page while click on Javascript History.Back


Hi All,

I am stuck with a unusual Scenario, I have Default.aspx page which contains a Search criteria option and Gridview, After doing particular search result is displayed in Gridview .

When i click on selectedindexchanged event of Gridview it takes me to another page called Details.aspx where there is form in edit mode where the user can update and save the data into a database . In Details.aspx page i have link button which have history.back function which takes me to default.aspx page where i can retain my Search criteria and Gridview Result but my query is when click on Link button i want to call any of the Events of Default.aspx page.

Thanks in Advance


how to create a log out page with clear session and cookies??? using c# .net


anyone got an idea on how to create a logout page that clears the session and cookies??? using c# .net...

thank you!

Clear session id on Logout click


 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?


please help me

How to redirect my page to login page on Logout ?



In logout link's click event i have written Session.Abandon() that will destroy the Session state.I am also handling Session_End event that is fired afterward (written in Global.asax). But one more thing i want is that after Session ends, login page should be redirected (opened).

For that i wrote:

 Protected Sub logOut_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles logOut.Click

End Sub

This is working fine on the surface, but after applying debugging i saw that there were unexpected number of  calls to Session_Start and Session_End events for two times, then login page was opened.

Why Session_Start and Session_End was called two times ? If i left this process as it is working then may i get some serious error in future ?

Auto logout and redirect to login page when session expires using asp.net

In this article I will explain you how to auto logout and redirect to login page when users session expires within specific period.

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

Reduce ASP.NET Page size and complexity using JQuery

This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.


I have 2 web pages. First page has a textbox and a button control.

when I enter test and click on the button , system goes to the second page. And in the second page I want to access the Textbox in the first page. When I try to do this I get the following error.

"Object reference not set to an instance of an object. Following is my code :

Dim txt As New TextBox

' Find the server name on the previous page
txt = CType(Page.PreviousPage.FindControl("TextBox2"), TextBox)
If Not IsNothing(txt) Then
Response.Write("[Name Not available]")
End If

I know I could do this with session, but I want to use the Page.PreviousPage.FindControl. Any help is greatly appreciated
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend