viewstate

Sensitive data in Viewstate?

ⅰ亾dé卋堺 提交于 2019-12-07 09:19:31
问题 I need to store sensitive data across few pages (run over https) per session. I can't use session object, for the primary reason being that the session store is designed as just as backup store (primarily make service calls and load the session). If the session has been restarted or in other words that the key in the session does not exist, make the service and re-populate the session. So, in the case of user keyed in sensitive data, i need to carry this data forward across pages, we do not

Is it possible to persist the viewstate between pages in ASP.NET?

老子叫甜甜 提交于 2019-12-07 07:09:58
问题 I have a button (view state enabled) in Master web page and set it to visible=false in one of the child web pages. If a second child page is opened, the button state ( visible=false) is not persisting. It seems viewstate is only valid for one page and is not transferred to other web pages. Is there some kind of trick to make viewstate global for all web pages? 回答1: No, viewstate is page specific. You will need to use something like a session variable or a querystring parameter to pass your

Failed to load viewstate

折月煮酒 提交于 2019-12-07 05:02:19
问题 OK have just started getting this error and I'm not sure why. I have a hosting page which has listview and a panel with a usercontrol. The listview loads up records with a linkbutton. You click the link button to edit that particular record - which gets loaded up in the formview (within the usercontrol) which goes to edit mode. After an update occurs in the formview I'm triggering an event which my hosting page is listening for. The hosting page then rebinds the listview to show the updated

Viewstate Optimisations

有些话、适合烂在心里 提交于 2019-12-06 17:12:13
问题 Hy, I'm interested in some general optimisation methods in an asp.net ajax project for Viewstate (ex. to reduce the size of viewstate , or just speeding up the viewstate somehow, or others this should be a general discussion :-) ). So what kind of optimisation do you use for ViewState? What possibilities are offered on Asp.net or Ajax framework? 回答1: @silky is right, disable it where ever you can. We try to keep it disabled on as many controls as possible. Also, once you're using as little as

can't turn off ViewState (asp.net/VS2010), what can be wrong?

无人久伴 提交于 2019-12-06 16:56:15
I'm working on an application which generates a list of customers from a db. I have disabled ViewState in default.aspx, but now when I viewed the source code of the generated HTML page I saw that the ViewState is on. I've tried to add both ViewStateMode="Disabled" and EnableViewState="False" (separately and even together) without any luck. What can be wrong? ViewState code from the source code if it helps: <div class="aspNetHidden"> <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /> <input type=

Is there any other way to store the data source other than view state?

时光怂恿深爱的人放手 提交于 2019-12-06 16:02:12
I have a page on which data table is created programmatically if the data is not there in the database tables. I have to use this data table in many events during postbacks. The data table may contain hundreds of records and there may be multiple users accessing the same page(Of course with different data source for each user). I am storing the data table in view state but I am afraid that this practice will make the page heavier. Is there any other way to preserve the data table across postbacks.The code is very long so I can not copy and past it here. Using session will again make the whole

Usercontrol losing Viewstate across Postback

*爱你&永不变心* 提交于 2019-12-06 15:53:42
问题 I have a user control which uses objects as inner properties (some code is below). I am having trouble with setting the attribute of the Step class programmatically, when set programmatically it is being lost across postback which would indicate something to do with Viewstate (?). When setting the property of the Step class declaratively it's working fine. Does anybody have any ideas of what this code be/what's causing it to lose the state across postback? ASPX Page <uc1:StepControl ID=

Minimize ViewState with TreeView

人盡茶涼 提交于 2019-12-06 09:40:26
Any practical tips/tricks on how to do that? It doesn't seem that there is a lot of information about how to do that. I am loading data from the database into TreeView and the max number of nodes will be around 100. I am still interested in minimizing the ViewState. I will also be adding and deleting nodes dynamically (though the user interaction). Thanks! PS: I am using asp.net 2.0, c#, webforms (so don't give me tips that relate to to ASP MVC only) here is a wonderful way to just get rid of viewstate from being sent over wire for each post-back. basically, it stores the complete viewstate as

ASP.Net viewstate questions on form postbacks

强颜欢笑 提交于 2019-12-06 07:19:28
Let's assume I have a very simple form, with a submit button and a dropdown list. When I change the list entry and hit submit, at what stage in the postback processing does the viewstate reflect my changed list entry? According to O'Reilly's Learning ASP.Net 3.5, there are two loads taking place-- one before form validation and another after (diagram on page 266 for those with a copy). According to the diagram the viewstate is loaded during the first load stage, before the validation. I assume my changed dropdown is reflected at this point? Also, according to the diagram, posted data is

System.Web.UI.ViewStateException ,Invalid viewstate

风流意气都作罢 提交于 2019-12-06 03:11:30
问题 My website is throwing the below exceptions everyday and i couldn't find the solution. i did few research in web and this is what i do so far. adding below option to aspx won't solve the problem. ValidateRequest="false" EnableEventValidation="false" ViewStateEncryptionMode="Never" EnableViewStateMac="false" Also, my Referral Url is the correct URL and i have no idea how it redirect with two (same) parameters. there is no such link in my referral page. Please help. ERROR LOG URL : http://www