viewstate

HowTo deal with cryptic hidden values for ASP Net (__VIEWSTATE)

吃可爱长大的小学妹 提交于 2019-12-10 18:32:26
问题 Hey Guys, I was trying to figure out how to deal with the cryptic "__VIEWSTATE" & Cie when you are trying to request (POST) a page with Python ! It's the main source of a lot of problems in my scripts ... and I realize, when I was looking for answers / solutions, that you don't have that much of solutions (almost 0 !). In this topic: Unable to load ASP.NET page using Python urllib2 You can see that I am giving my solution with consist in parsing the value of the cryptic fields every time you

javax.faces.ViewState is missing after ajax render

蓝咒 提交于 2019-12-10 15:32:39
问题 This is not a duplicate post, i just done research but not helping. First, this is my page... simplified for easy reading. <h:form id="treeForm"> <f:event type="preRenderView" listener="#{taskTreeBean.update}" /> <rich:tree id="tree" nodeType="#{node.type}" var="node" value="#{taskTreeBean.rootNodes}" toggleType="client" selectionType="ajax" render="@all" selectionChangeListener="#{taskTreeBean.selectionChanged}"> <rich:treeNode> ... </rich:treeNode> </rich:tree> </h:form> <h:form id=

Is EnableViewStateMAC=true compulsory for ViewStateEncryption in an ASP.Net Website?

佐手、 提交于 2019-12-10 14:59:41
问题 I'm currently fixing some Security issues in our ASP.net website application. One of the issue was that the ViewState was not encrypted. So I did check on StackOverFlow and elsewhere on how to encrypt the viewState, and I did it using the <pages viewStateEncryptionMode="Always" /> and adding a 3DES machinekey like this <machineKey validation="3DES" /> in Web.config . I would like to know if the "EnableViewStateMAC=true" is also compulsorily necessary? since this was mentioned in some of the

How do I enable ViewState for child custom controls when disabled in parent?

左心房为你撑大大i 提交于 2019-12-10 14:07:42
问题 I am trying to create a custom control that a "gridview" like control but specifcally for business objects that implement certain custom interfaces. In doing this I have come across the following problem. I have a control that I have disabled viewstate on (and I don't want to re-enable it) and it has a child control that I want viewstate enabled on. I can't seem to get the viewstate on the child control to work since its parents is disabled. Does anyone have any ideas of how to get that to

Why does asp.net wrap the page in a form?

混江龙づ霸主 提交于 2019-12-10 13:04:25
问题 I'm a PHP developer who has to work on ASP.net projects and I'm wondering why every page is wrapped in a form. This just doesn't make sense to me. Also What's with all the hidden input fields especially the "View State" one. 回答1: ASP.Net tries to make it so that the programmers can pretend that the web is a stateful platform, and that it behaves like a desktop application. The ViewState is basically a serialized block of the state of the page when it was generated. When the page gets posted

ASP.Net RadioButton loses ViewState

回眸只為那壹抹淺笑 提交于 2019-12-10 12:15:23
问题 I'm having trouble with a simple radio set of two radio buttons (I don't want to use a RadioButtonList [RBL] because RBL doesn't allow child controls, and in my case, if you select one option, I want to enable a textbox next to the button; yes you could hack this with jQuery to move the textbox, but that's dirty!). I would check one, submit the form (either explicitly or through AutoPostBack), and the CheckedChanged event would never fire. When the page was reloaded, both buttons would be

Invalid character in a base-64 string - ViewState?

旧城冷巷雨未停 提交于 2019-12-10 10:01:51
问题 Web application is throwing a handful of these errors everyday. Exception: System.FormatException: Invalid character in a Base-64 string. at System.Convert.FromBase64String(String s) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) at System.Web.UI.HiddenFieldPageStatePersister.Load() I think the error's coming from decoding the ViewState, but I'm having trouble just triggering

Firefox overrides javax.faces.ViewState with old value on F5, how to turn off autocomplete

拥有回忆 提交于 2019-12-09 23:37:17
问题 I am using JSF 2.1 on Tomcat 7 and opening it in Firefox 23.0.0.1. The page generates a javax.faces.ViewState hidden input field as expected: <input type="hidden" value="2442695108697186454:-4079620282104128276" id="javax.faces.ViewState" name="javax.faces.ViewState"> When hitting F5, the server sends a new id for javax.faces.ViewState , which is correct. However, Firefox keeps the old value in the hidden input. The result is that the old view-scoped bean is taken on ajax requests. Only when

Viewstate of ascx lost between postbacks

亡梦爱人 提交于 2019-12-09 11:51:37
问题 In my ASP.NET application, I am loading an .ascx dynamically using LoadControl, using the following pattern: var ctrl = LoadControl("/path/to/control.ascx"); ((ControlType)ctrl).SomeProperty = someData; placeholder.Controls.Add(ctrl); The control that I add saves the SomeProperty property value directly to ViewState, as follows: public int? SomeProperty { get { return (int?)ViewState["SomeProperty"]; } set { ViewState["SomeProperty"] = value; } } After that, the ascx control lives a life on

How to remove or compress your asp.net viewstate

放肆的年华 提交于 2019-12-09 09:25:20
问题 Just spent a lot of time exorcising asp.net's large (but understandably useful) viewstate from an app, and i think it's worth sharing how it's done. Basically, i want this question to be open to all solutions for shrinking/compressing/removing viewstate. 回答1: First easy option, use the built-in SessionPageStatePersister class. What this does is keep the viewstate on the session on the server, rather than sending it to the client. However, it still sends a smaller viewstate down so isn't all