.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

Page refreshes back to original state

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

Hello everyone,

First off, I'd like to apologise if this is not the correct section to be posting in. I am currently having a problem with my page that I am working on. The problem is essentially this:

- Page is loaded

- User can click a button (BUTTONS PURPOSE: once this button is clicked it reveals a hidden table that displays some data)

- When this button is clicked the table is revealed (for a split second) then the page is refreshed and the table is then hidden again.

I want the table to remain visible, but am unsure of how to go about doing this. Any help would be greatly appreciated! Please let me know if I have not been specific enough or if I need to provide some more information.

View Complete Post

More Related Resource Links

Problem when I back to page


Hi Friends

I have page A.aspx where I show some result in listview. When I click On Some data on listview I go to page B.aspx.

Now the problem is when I click on back in page B.aspx it comes to A.aspx with out previous listview result. Ack requirement is when I come to page A.aspx result of listview has to be there. How do i do that?

Could u please help me out?



How to return back to a specific page in a gridview list?

Hello,  I have a gridview with paging. So for instance, I'm on say the page number 10, and I open the form details on a specific record_id (link). After I update/submit the form, it returns to page number 10. But, if I go to another page, for instance page 5, and submit the form, it returns to page 10. I've tried some things, for instance history.back(), but it returns to the first page I went to, in this case page number 10 (or whatever the first page I go to). Hopefully this code helps to understand what I'm asking: <asp:GridView DataKeyNames="Referral ID" ID="gvList" runat="server" CellPadding="4"     ForeColor="#333333" GridLines="None" OnRowCommand="gvList_RowCommand"     OnRowDataBound="gvList_RowDataBound" OnRowDeleted="gvList_RowDeleted"     OnRowDeleting="gvList_RowDeleting" AllowPaging="True" PageSize="20"     AutoGenerateColumns="False" OnPageIndexChanging="gvList_PageIndexChanging"    OnRowCreated="OnRowCreated" AllowSorting="True" OnSorting="OnSort"> protected void gvList_PageIndexChanging(object sender, GridViewPageEventArgs e)        {   &nb

Maintain Controls State on Master Page.

I have Web Application which uses the Logged In User (Authenticated User) to query his Profile Data from Adabas/Unix using OLEDB. The application provides the user with about 21 different pages (Basic Info, Employment Info, Education, Dependants, Financial Info ...). The web application has a master page, and each profile data page is based on a User Control loaded in the Child ASPX Page. Since we are migrating our legacy applications from Adabas/Unix to SAP, the development Team has prepared web services to query for the same Profile Data from SAP using Web Services. Now, we have to modify the web application to consume the web services instead of using OLEDB to query Adabas. Since we are in the testing phase, and we have only very limited data in SAP, I have to provide temporary control to allow test query the Staff Profile for a Specified User (instead of the Authenticated User) and to select the Source: 1. SAP, or 2. Adabas.   So I am thinking to add the following "Control Section" in the Master Page:<div runat="server" id="divSAPTest" class="SAPTest"> <span>Test SAP Web Services. Enter Staff ID: </span> <asp:TextBox ID="txtSAPStaffID" runat="server" Width="60px"></asp:TextBox> <span>From: </span> <asp:DropDo

Go Back to Site link missing in Error Page

hi,             i developed eventhandler where Properties.Cancel=true..takes to the defualt sharepoint error page. in this page i am missing go back to site link. how to set this link in the error page?   also can we set the link in the Properties.ErrorMessage="cannot update. please click here"+"<a href="+siteurl+"/>";   please help.  

The state information is invalid for this page and might be corrupted.

Dear All,     I got the following error today. But yesterday this application is running fine.     Even today i try to move this project to another server. The same symptom I got.     Does anyone know what's happened for this case?     Thanks, Best Regards, Benny Ng       Server Error in '/LGOldServices' Application.-------------------------------------------------------------------------------- The state information is invalid for this page and might be corrupted.Description: An unhandled exception occurred during the execution of thecurrent web request. Please review the stack trace for more informationabout the error and where it originated in the code. Exception Details: System.Web.HttpException: The state information isinvalid for this page and might be corrupted. Source Error: [No relevant source lines] Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NETFiles\lgoldservices\10b99f4d\fe7b353e\App_Web_jlz_zk70.4.cs    Line: 0 Stack Trace: [FormatException: Invalid character in a Base-64 string.]   System.Convert.FromBase64String(String s) +0   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +67   System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(StringserializedState) +4   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter,String serializedState) +37   System.Web.UI.HiddenFieldPageState

My Grid is not refreshing like it should. It only refreshes through a hard refresh of the page (F5)

Here is the code. I have Javascript in there that runs after the save button on the ExtJS popup is clicked, that is supposed to  refresh the grid to show the uploaded files, but the grid will SOMETIMES show nothing, and sometimes show the files. It ALWAYS shows  the files after a hard refresh of the page (F5). Why is it doing this? <br/> <br/> <%@ Page Language="VB" Inherits="Web.BaseView(Of Lending.Controllers.Workspace.DocumentUploadData)" %> <%@ Import Namespace="WebControls.Forms" %> <%@ Import Namespace="WebControls.Grids" %> <script runat="server"> </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title>     <script language="javascript" type="text/javascript">         function RefreshGrid(result, data) {             if (data.responseText.length > 0) {                 var obj = eval('(' + data.responseText + ')');                 if (obj.Result == false) {                     Global.alertError(obj.UserM

return url in aspx refreshes the page when I click login after entering user name and password

Hello,   I need help as I am struggling to login into my web portal on my new sony vaio laptop. I think that I need to do some settings, or download some plugin. Infact I don't know what to do, as I have spent many hours trying to login, but no success. Below is my office website:   http://www.lantec-uk.net/SignIn.aspx?ReturnUrl=%2fdefault.aspx When I enter my credentials and click login, the web page gets refreshed, i.e username and password get erased, rather than taking me into my web-portal. The laptop is having windows 7 home premium, with ie8. I have also tried installing firefox, chrome, opera and safari, but same problem. Somebody please help, as sony has refused to take the laptop back and they are saying that there is problem with website. Similarly, website staff are saying that there is a problem with the laptop and not with the website.   Any help highly appreciated. 

Can't reset DefaultTemplates.ascx to original state after some changes

Hello everyone. I've made some changes in DefaultTemplates.ascx and save the file. Nothing serious, just added some plain text to RichTextField template to test it. This changes are immediately applied to my site so i can see them. But when i decided to rollback changes and return template to it original state, it didn't have any effect. Control is still in customized state. Iisreset doesn't help at all. Maybe anyone know what it can be? It really makes me crazy. Please, tell me how i can reset my page and this template to its original state. I am using SP 2007. Thanks. P.S. Sorry for my bad english.

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

how to maintain state of accordion pane from one page to another

 Hi,   I am using accordion control in one of my project. I want to maintain the state of the accordion pane when the user navigates from one page to another. Can someone help me  ?? Below given is the code of my accordion control I do not want to use query string because i am using url rewriting. <cc1:Accordion   ID="accNavMenu" runat="server" TransitionDuration="100"    FramesPerSecond="200" FadeTransitions="true" RequireOpenedPane="false"    OnItemDataBound="accNavMenu_ItemDataBound"   ContentCssClass="sidenav2" HeaderCssClass="sidenav"    HeaderSelectedCssClass="acc-selected">    <HeaderTemplate>    <asp:HiddenField ID="hdTemplate" runat="server"           Value='<%# DataBinder.Eval(Container.DataItem,"Template") %>'      />     <asp:HiddenField ID="hdSectionID" runat="server"           Value='<%# DataBinder.Eval(Container.DataItem,"SectionID") %>'      />    <table cellpadding="0" cellspacing=&quo

The state information is invalid for this page and might be corrupted.


I am getting the "The state information is invalid for this page and might be corrupted." error while creating tabs using jquery. I am loading pages to the dynamically created div using jquery and when i click any of the buttons in the page i get this error. The created tabs are working fine.  Only thing is if i click any buttons that cause postback resulting in the above error. Help me please regarding this.

How to Trap a "Page Back" or "Page Close" or "Tab Close" Event


 VWD 2008 Express.  Visual Basic.

I have seen pages on the net that when you try to navigate away, they pop up a message asking whether you really want to navigate away.  How can I accomplish this to detect someone hitting the "page back" arrow in a browser or the "x" that closes a browser page or when someone tries to close a browser tab?  Thanks for the help.

The state information is invalid for this page and might be corrupted.



I have read the full 6 pages (90 posts) of the thread http://forums.asp.net/7/1173230/ShowThread.aspx and tried just about every single suggestion. nothing has fixed this error.
Sorry for duplicate posting this, I posted this question in that forum thread as well but i have since realized that thread has the "answered" icon so i doubt i will get much help from posting in that thread...

My c# asp.net 2.0 website has not been upgraded from a 1.1 or 1.0 project. I built it from scratch, using 2.0 the whole time. (It would seem most people have this error due to an "upgrading from 1.1" issue, which isn't the case for me)

The error I am getting is:

The state information is invalid for this page and might be corrupted.

and my current web.config file looks like this:






validateRequest="false" >


The page(s) that produce this error are all on Firefox. I simultaneously run IE on the same pages to test things at the same time and find that IE has no conflicts whatsoever, these errors are occuring in Firef

Recover data on a Previous Page after navigating from the page and navigating back

How can i recover the data on Page1 after navigating to Page2, so that when i navigate to Page1 from Page 2 i want the unsaved data as is.

Retrieve Previous State Data on return from another page


I have a list page having date in repeater control. And also having some search criteria on the page. Using that I filter the data on the page. Now in repeater I have Edit button. Which allows me to open that record details in another page.
When I come back to list after saving or cancel, the filtered data is gone. I want to keep that filtered record with selected values in filter controls (checkbox, dropdown etc).
I have two options in my mind 1) Session, 2)

Page does not post back when clicking any button

I thought the page was working fine yesterday. Today I added some code in various places and now a click on any button does not post back.

What could I check that has changed? Any suggesyions? Thank you.
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