i am using window.opener.location.href = window.opener.location.href; to refresh a page from another page
and it s working fine but i need to preserve state because i am loosing any ViewState on the first page when i do this. It will be as if the user typed in the url in the browser again instead of hitting refresh.
I have a very simple nav menu of 5 imagebuttons: home, bios, areas, resources, contact.As a user rolls OVER the imagebuttons, the imagebutton change to a black background. As a user rolls OFF the imagebutton, it reverts to the original image. If a user clicks on a imagebutton (ie contact), I programmatically set it to the rollover with black background. The goal is to: if a user clicks on an imagebutton, then continue to show that imagebutton in the rollover state so the user can tell what page they are on. I have all this working just fine.My problem is this: If the user then rolls OFF one of the selected imagebuttons for the page they are on, then the javascript overrides the code-behind and changes the image to the original image. The menu then no longer shows the page that the user is on.What do I need to do to keep the rollover state active if the button is clicked and then rolled over later? For example, a user clicks on Contact, then moves the mouse off of that button. I want the imagebutton for Contact to stay in the rollover state.aspx.cs:
if (!IsPostBack) { ImageButtonWelcome.Attributes.Add("onmouseover", "this.src='images/rollover/images/welcome.jpg'");
I am having a ASP.net application it having three pages ,page 1,page 2,page 3,when the user navigating between this pages I want to maintain the view state in page level after postbacks(i.e.) .If a user visits page 3, passing some query loads some data .then he moves to page 1 doing some entries .after that he once again moves to page 3 now I want to display the data previously available at the time he moves to page 1, same way I want to do to my three pages up to the user logging out.
I'm having troubles remembering how to grab the list view's state, or page, so that when you leave the list, you can return to the list view page you left on. I have a data pager, and I have hyplerlinks for items in the list view that take you to a file upload or file delete page, and then returns to the list view. It returns to the list view's initial state (first page).
Here is what I want to do: I have a local site in which I want to display data from a remote site Lets say: I want to display data of http://www.abc.com/Default.aspx on my localhost
Now Default.aspx requires some post-data which it sends to itself. Thus the __viewstate and __eventvalidation are posted back to it by itself. I want to directly post the data to Default.aspx from localhost without opening Default.aspx and display the Default.aspx's response on my localhost.
The WebApp on http://www.abc.com is configured for __eventvalidation i.e. I cannot post-data to it from my localhost without getting a __viewstate from it. I also have to post the current __viewstate of http://www.abc.com/Default.aspx to itself
Recently I had migrated my ASP.net 1.1 based application from a IIS5.1 based platform to a IIS 6.0 based Platform.The new platform has 4 nodes with a load balancer.
One of the page of my application, which is perhaps the heaviest one in terms of form components like textboxes, dropdown is not behaving properly.Some times the users only get a "Blank White Screen" and some time they get a "Invalid ViewState" , Invalid length for a Base-64 char array.
Based on the KB http://support.microsoft.com/kb/831150 I understand that the view state is getting truncated.
I had been facing this issue since we migrated to the new platform and the application was working perfectly fine on the old platform.
My <input id="FileUpload1" name="FileUpload1" type="file"> and country dropdown both are inside update panel , now on selectedindexchanged it do postback , which i am triggering in update panel to avoid page refresh .
Now the problem is when i select any image in fileupload and then select country , my selectedimage vanishes but its path stays in textbox .
I have a gridview in which I have the autopaging option set to true, when i load the grid everything works on the first page, i can even go to second page , but when i click the edit button nothing happens and after that any click blows up the page giving me error Faile to load view state.
I have a master page and i am changing the masterpage file property to some other master page dynamically in the page PreInit event and that changing url is taken from a viewstate. but the view state is not getting in the pre init event.
I have Web page that uses LinkButton control inside Template Fields of Gridview.I am trying to work on LinkButton Click event and trying to preserve the Value of LinkButton that user click, and based on that value, i want to refresh tha page data.I used CommandName and CommandArgument property of Linkbutton, but i can use that property only in GridView_RowCommand method by checking e.CommandName expression. But the problem with that Gridview_RowCommand event fire after all other page_load activity. So the value never used in the page_load event to refresh the data in all other control.
I am trying to figure out how to preserve the values of the controls on this page (just the user-submitted commission value and the sales region (eastern is 10% and western is 20%)).
The code is as follows:
<form id='frmShowCommSingleDocKeepState' action='afShowCommSingleDocKeepState.aspx' method='get' > <div> <% Dim strSale As String Dim dblSale As Double Dim strRegion As String Dim dblComm As Double Dim E As Double = 0.1 Dim W As Double = 0.2........
i have one method which save datatable in viewstate.i am calling this method in. page_load2. Prerenderthe page was every heavy,i did tracing of page i found due to calling of method from preprnder it doubled the viewstate sizewhat was the reseon behind this.
we are making an application in asp.net(visual studio 2008). In this we have made a page in which we have a submit button. on clicking on this submit button we go to next page.on this next page we have a back button.we want that when we click on this back button then the values that we have entered in the previous page is preserved(i.e displayed on the controls in which we have filled).
I have a page with is basically a few Gridviews that I want to email to some users. The Gridviews are connected to sqldatacontrols. I create the select statements in the code behind. This all works fine.
To email the page I read the page into a streamreader and then creates an email and sends it. So when I get the email the Gridviews show no data.
I stepped through my code and found that the issue is with a variable. The Select statement has a few parameters one of which comes from a profile variable. When the page is read the profile variable is empty. I tried it as a session variable and that fails as well so my question is if I cannot use profile variables or session variables what other way is there to save this data?
In VB I can place module level variables so that say when a form loaded and I wanted to save a variable I would load the module variable which made it available to any form in the project but I assume that I cannot do the same in VB.net asp.Net? On the first page load the variable is available I just have to figure out a way to save it to pull out again when the page posts back.
I have two dropdownlist in cascading working, in my file file.aspx, all work good.the selected values from cascading dropdownlist bind my repeater. when select item inside repeater redirect me to second.aspx. when comeback to first.aspx i lose all selected values in cascading dropddowlist and also values in repeater.
I know the basic of view state. But I dont understand the functionality of view state at a control. For example, a texbox has a property view state. what is the purpose ? what it wiil act for true or false value.
*1* report views -- 4 options -- NOT in updatepanel *2* pagination views -- 2 options -- IS in updatepanel
The situation goes as follows: Refresh WORKS in default setting but when I select *2* radio button options and refresh the page renders the state that the (1) was entered in.
I am using the session variable to hold the Pagination Viewing option but during page states, I've noticed that when a 2nd option is selected of *2* radio buttons (doesn't matter of 1st or 2nd option was initially selected) that during debugging mode the step over corrects the issue but not the right table viewing. Upon entering Page_Init selection selection index of radio button list returns to 1st option.
1. the difference of view state and control state. 2. when & how view state is created after that what extent we can use that view state. 3. when & how control state is created after that what extent we can use that controlstate.
As a programmer how much clarification we need to know about view state and control state??
I am trying to use "viewstate" inorder to 1.get the information i type in onepage and retrieve into another page.2.so i created 2 text boxes FirstName and Lastname and a submit button in first web page.3.i want to retrieve these names in the other page for which i am writing the code for button.But i dont know exactly how to use the viewstate....i tried with request.querystring and its working.So i want to use viewstate instead request.querystring.
I have a grid view with a nested text box in it.I would like to turn view state off but the fact of the matter is when data is posted,the text boxes inside the gridview aren't available (there are no rows in the gridview on postback). Control's information is not stored in the View State (for things like selected value and .text etc.):Control state,introduced in ASP.NET version 2.0, is similar to view state but functionally independent of view state.However,control state cannot be disabled. Control state is designed for storing a control's essential data (such as a pager control's page number) that must be available on postback to enable the control to function even when view state has been disabled. Source: http://msdn.microsoft.com/en-us/library/1whwt1k7.aspx