I am doing webparts in sharepoint and I want to transfer the data from one to another. I tried the 3 ways but they all fail. Any idea?
It just says
An unexpected error has occurred.
...
Hi every one!
Does Page class adds ViewState for Controls created in CreateChildControls, I mean I have a page which I add some controls to the page and all of them are Literal and EnableViewState is false, my question is are there any ViewState entry gor them in Page's ViewState?
Thank you.
...
The only way I've found to persist property values within a user control is to use the ViewState.
public string Title {
get { return Convert.ToString(ViewState["Title"]); }
set { ViewState["Title"] = value; }
}
I can't say I'm real impressed with this though, as the more properties a user control has the more crap ...
Hi! I am getting a viewstate error on the live site: Thanks on any advice
Inner Exception: System.Web.UI.ViewStateException: Invalid viewstate. Client IP: 111.34.19.201 Port: 54016 User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; GTB6; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618) ViewState: /wEPDwUKMT...
I have a div that sometimes it is visible, sometimes not.
So, I put the code on OnPreRender method, div.Visible = false.
What happens is: When the property "EnableViewState" is true, the div never be invisible, only when "EnableViewState" is false. How I solve this problem?
...
I have a problem that a DropDownList is losing its SelectedValue after a PostBack on one server on the web farm. On the other servers, everything is working correctly.
All servers are on the same version of code with the same service packs and all updates applied. The code also works correctly when I run on my local machine (but point ...
I'm using RenderControl(writer) on a set of ASP.NET controls to get the generated server control markup back, for a template. These are form controls, such as radioboxes, input boxes, checkboxes.
The problem with this is the control's Parent.UniqueId is not set at this point, not Parent.Parent and so on. This means that the name="" attr...
I have an ASP.Net 3.5 app that needs to run on WebSeal which is a Java reverse-proxy app that re-formats URLs in the page delivered to the browser so that a URL of www.myserver.com can become www.myserver.com/newlocation/home. It looks for URLs to modify in the page and performs a string replacement to the re-directed address.
My probl...
Is there any way I can simulate a proxy server truncating a viewstate?
...
I am trying to use ViewState to store a collection, but it always get me the error:
Object reference not set to an instance of an object.
I don't know when to initialize it and where? Sometimes I use:
if(ViewState["X"]==null) ViewState["X"] = new List<Checkitem>();
and I put it at the Page_Init() event, but it keeps initializing it ea...
Hi SO:
I have a page with several expandable lists. In a perfect world, I would like to display links to each of these lists and when one is clicked it will reload the page with that particular list displayed. I read that ViewState can eliminate the need for hidden input fields, query strings, etc, but I am not familiar with the concept...
I am building an application in ASP.NET 2.0 and the value for the view state is huge:
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTExNz...
The value contains 535,000 characters. Is this normal? How can I make it smaller?
...
Let's say I have a Web application implemented like a set of wizard pages to edit a complex object. Until the user clicks on the "Finish" button, the object doesn't get saved to the back-end system (a requirement), so in the meantime I have to keep the whole information about the object in some kind of a session state.
Also, some of the...
I am using ViewState to save some data from a page to another on sharepoint, and when I write this line at the Page_Load event I get an error but it doesn't say anything. Any clue?
Label l = new Label();
l.Text = ViewState["user"].ToString();
and also this one
Session["user"] = (sender as LinkButton).Text;
...
I am fixing an ASP.NET application that makes heavy use of session to track per-page data. One of the problems is that the session bleeds between pages.
ViewState would be a better solution, except:
The data is not serializable
There is too much data to be sending back and forth each postback
So I want to:
create a page key for t...
Possible Duplicate:
ASP.NET MVC doesn’t work with ViewState and Postback?
One of the major reasons for using webforms is the ease of being able to maintain viewstate. I would like to build an asp.net mvc application so what options do I have for maintaining viewstate?
...
Hi,
Let's say we have 2 usercontrols uc1 and uc2 in a Page. I set the Viewstate["name"]="John" in uc1. How do I access this Viewstate["name"] in uc2 control?
...
Given two tables, Make and Model, where a make can contain many models and resulting in the following EF generated entity types...
/// <KeyProperties>
/// ID
/// </KeyProperties>
[global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="CarsModel", Name="Make")]
[global::System.Runtime.Serialization.DataContractAttr...
If an asp.net DropDownList's is set to EnableViewState=false, DropDownList.SelectedItem returns null.
Then what technique can I use to get the SelectedItem of that DropDownList while keeping that EnableViewState=false?
...
For some reason the viewstate of my application became gigantic (around 14 million characters). It adds around 1 minute of loading time. If the page finally loads (which is not often), the server crashes every time someone send a form because "Post size exceeded allowed limits. "
It appeared suddenly. I didn't add any fields, just some ...