viewstate

Add/Remove items from one ListBox control to another ListBox control in ASP.NET from the client-side

I'm moving itmes from one ASP.NET ListBox control to another ListBox control from client-side. It works on the client-side but when I tried to count items in destination ListBox on the server-side, it's always nothing. Below, is the jQuery code used to add/remove items from ListBox control. <script type="text/javascript"> $(document...

Viewstate, have I understood this correctly?

Say I have 5 buttons on a page, numbered 1-5. When one is clicked, a value with a viewtate getter/setter assigns this the value of the button clicked. If I am checking for a value in Page_Init() / OnInit(), after the postback has occured, the value will always be empty/null. Is this correct? If so, is there anything else I can do th...

How much work to get Episerver to leave ID-attributes alone?

Is there a way to make Episerver leave the HTML id attribute alone and more importantly how much work is that? I know you could also remove the viewstate, how much work is that? I'm not here to start a discussion about semantics and optimization, whether or not a CMS should touch the front-end code is a long debate. I just need to know...

Display hiarchy of n levels in cascading drop down lists or other smart solution that isn't TreeView

Well the title basically explains the problem pretty good, I have a hierarchy of n-level depth that I would like to display in a number or cascading dropdown lists. When making a choice in the first dropdown list all child nodes for that choice should be populated in another dropdown list next to the first, and for every choice in that s...

Documentation on States for a View

How can I determine what states are possible for a particular view? I see that the View class defines all the possible states. Does this mean practically that all views can be in all states? For example, I am working with ListView. When I add the listSelector attribute, my StateListDrawable item "state_focused" works but "state_selec...

RaisePostDataChangedEvent not called after returning true from LoadPostData

I have derived my own class ControlStateDropDownList which extends DropDownList. As its name suggests, its purpose is to use the ControlState instead of the ViewState to store the SelectedIndex. AutoPostBack is set to true. This is a requirement because this derived DropDownList needs to be inside an ASPxGridView column, and the ASPxGri...

Is there a benefit of turning ViewState Encryption Off (asp.net IIS7)?

I understand how to turn off ViewState encryption for asp.net web applications. I want to know if I should. My question is more from a performance stand point than a security one (All of our traffic is on a private network and we do not store any sensitive data in the viewstate). Before I dedicate hours of setting up tests scenarios...

Where in the page lifecycle can I safely load/remove dynamic controls?

I'm working with dynamic fields in ASP.NET due to a very specifc and rigid end-user requirement that would take 2 hours just to explain. Suffice it to say, I can't make the requirement go away. Anyway, I have a working solution in place; no problems with controls loading, rendering or maintaining their ViewState. This is what my OnL...

Asp.Net Gridview

I have a gridview with an enormous viewstate that I am attempting to shrink. I have turned the viewstate off in the control(which the gridview is in) but this seems to have done next to nothing in terms of the page size. Now the gridview has buttons and dropdowns in it, which I know add to the size. But cannot be helped. Now short or r...

Examine the ViewState object

How can you examine what's in the ViewState for a control/page? When I try to look at the object in the debugger, the keys, the values, the Non-public members are all "turtles all the way down". ...

Textbox control dont lose value on postback if viewstate is disabled

When we disabled the viewstate in gridview its lose value but this case not true with Textbox control why? ...

Failed to load viewstate composite control

I have a composite control that contains a different set of child controls based on the value of one of it's properties at runtime. Whenever there is a postback, I get the following error: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during t...

Viewstate lost on postback for .net Sitecore page

Hello, I'm getting some strange behaviour with viewstate being lost on postback for a .net application using Sitecore. I'm assuming it might be some config variable somewhere but I'm new to Sitecore and don't really know where to start looking. UPDATE: Sitecore has now gotten back to us with an answer. We had recently added the dtSea...

Alternative to ViewState

I'd like to store a few variables which will be referenced throughout lifecycle, starting with a db access in PreInit event. ViewState isn't an option, since it won't persist if saved so early during the page lifecycle. Given that data should not be altered by a user, what would be the best alternative? ...

Determine size of ASP.NET page's viewstate before serving page

What ASP.NET page lifecycle event can I write code in to determine the size of the viewstate that being sent out? Also, is it possible to determine the size without parsing through the rendered HTML (like a property on the page object) or is parsing the only way? What I'd like to do is log the sizes, specifically if they cross a certai...

ASP.NET Server Control - Is shared Viewstate between controls possible

If I have a master 'composite custom server control', with several child custom controls, is it possible, for the master control to share its viewstate with the child controls, which are also custom composite server controls,(all of the controls are composite custom server controls)? To expand a little more, say I have a Person control...

How to save value across postbacks for a composite control without using viewstate

I have a composite control that has a couple of private fields that reference values in the cache and these private fields are called during the constructor method. Since a string key is used to identify the value in the cache, I must have a way of storing that string key in such a way that it is available at the time the control is ins...

Does an absence of EnableViewState in a DropDownList default to False even if VS 2008 implies True?

While debugging a postback problem with a DropDownList within a Repeater I discovered that even though everything looked like it was set up correctly the selections from the user on the DropDownList were not being restored from the view state. My DropDownList was defined as <asp:DropDownList ID="EmployeeColumnDropDownList" runat="serve...