viewstate

ViewState and client-side changes

I noticed that some controls (e.g. TextBox) keep their changes between postbacks even if the change is made by a client-side script while some others don't (e.g. ListBox). Can anyone explain me why? Is there any way to extend the first behavior to other controls? Thank you! ...

Can I explicitly force asp.NET to re-load the ViewState data of any data-control?

Hi, I have a problem regarding to asp.net lifecylce hierarchy. Basically, I have one user control which has a GridView in it. And this GridView is dynamically generated based on a public property on the control (named Parameter in the simplified code below). Everything is fine when I insert this control in an aspx page, set its Parame...

Modify VIEWSTATE string before it's deserialised

The reason for this is that there is a specific issue where exclamation marks followed by whitespace are placed in the VIEWSTATE by some random company routers/server/something. After removing these, the VIEWSTATE is fine and can be deserialised (as confirmed by View State Decoder 2 which is a pretty cool program). So, what I want to d...

Comparing Viewstate and SessionState

I set ViewState["zzz"] and Session["zzz"] to the same string. When I compare using == I get false. When I do ViewState["zzz"].Equals(Session["zzz"]), I get true. In the debugger, both their values show the same string, and when I do ? ViewState["zzz"] == Session["zzz"] I get false. I thought the ViewState StateBag Item defaults to...

Silverlight drawing (Path) and ViewStateManger and ControlTemplates

I have to draw a number of shapes to represent an orchard. Each of these shapes are different 'shapes'. But I want the all to have the same concept of states so if that region changes state it will change color independently of the other shapes. (note they are all independent of each other and can be in different states). How do I do ...

Is it safe to store credit card and pricing information in ViewState even over ssl?

The Title pretty much says it all but to clarify more I have a page with private properties that are storing a credit card object and a shopping cart object in viewstate so I can maintain a reference to them across postbacks. BTW the page involved will be using ssl. Is this safe? Thanks!!! ...

Programmatically logging into DotNetPanel using PHP.

I use software called DotNetPanel (DNP) and I'm modifying PHProxy to automatically log into the administration panels for me. I've done this for several other types of software - like cPanel - just fine using authentication headers or POST variables, but DNP uses something I'm not familiar with - ViewState. When I POST the user/pass d...

ASP.NET custom control: when is LoadPostData() called?

Hi all I have developed a custom control that extends ListBox. The idea is that the control 'remembers' modifications to its elements which occurred client-side, e.g. as a result of an AJAX request. The way it works is that the control also renders a hidden input, and the result of the AJAX request is stored in the hidden input. This ...

How does Viewstate work internally

Scratch this! I have googled my ass off looking for this. 1. Lets say that i have a webform that has a few textboxes, with ID's textbox1, textbox2, textbox3. They all have viewstate enabled. I put some values in these textboxes and push a empty postback button and all the values are still there after postback. How can i access them in t...

Can a php proxy script call javascript functions like click?

Hello, I'm adding to a PHProxy script to GET a certain page and fills in required forms with cURL and some R.E. This page is usually submitted with a button. I'm not posting directly to a page because the other server uses an IIS server with an 'viewstate' variable that I can't seem to proxyify correctly without receiving viewstate err...

Can ASP.NET state management be daunting for beginners?

To all you ASP.NET experts and beginners, do you look at a state management as a difficult and annoying task to do? If you were to start over with ASP.NET would you consider ASP.NET MVC and never have to deal with ViewState again? Also , is it true that once you go ASP.NET MVC you never go back to ASP.NET Webforms (Unless of course your...

Grid View - Do I Need ViewState for Nested Controls

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). I am using ASP.NET 2.0 so would this fall into control state, not view state? Sample ASPX code of t...

asp.net save textbox on redirect

I am new to ASP.net and I am trying to save the state of some textboxes on redirect. I have a dashboard interface with drilldown. The main dashboard page has a date range option (textbox for both start date and end date) for the information displayed and I need to save the date range chosen by the user. I know that I can put the info int...

php curl - posting asp.net viewstate value

Hi guys. I have the following code to login into an external site application (asp.net app) from a local site login form (written in php): <?php $curl_connection = curl_init('www.external.com/login.aspx'); curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatib...

Repeater in my user control is empty on postback

I've looked at a lot of similar questions here, but to no avail. So here goes... I'm creating a set of user controls that display a list of grid-like tables. Anyway, the objective is to list the grids, mess with the each grids data (client-side) and press save. The grids work great, but when I press save teh repeater in the VIEWER is...

ASP.NET - View State being passed in URL

When submitting forms using the "GET" method, I am getting a huge URL containing ViewState (as well as other values I don't want). e.g. http://mysite.com/page.aspx?__EVENTTARGET=&amp;__EVENTARGUMENT=&amp;__VIEWSTATE=%2FwEPDwUKMTI5NjY4NDkzNw9kFgICAw9kFgICBw8PFgIeBFRleHQFOzx0YWJsZT48dHI%2BPHRkPlN0YXJ0aW5nPC90ZD48dGQ%2BVGhlIFRhYmxlPC90ZD4...

When should I consider to use SessionState to keep my variable values?

Hi, Is is possible to say something like "If you have those situations then SessionState is a must to use for storing your values between postbacks." Can you list me the basic reasons which forces an asp.net developer to switch SessionState from ViewState or HiddenFields or querystrings? thanks ...

Telerik Rad Combo and async postbacks in asp.net

Hi, it looks like nobody has posted on this. I have a very typical set up, an ajax update panel is updated when a drop list of offices changes. Each form could have it's own values, for instance each store will have it's own list of employees. Here is where the fun begins. The form can be changed by the drop down (new office) or validat...

Property from a custom UserControl that is saved in viewstate loses its value

I have a custom control in an aspx page that has a property named Size public int Size { get { return Convert.ToInt32(ViewState["CreativeSize"]); } set { ViewState["CreativeSize"] = value; } } This property is set in the aspx page to a value lets say 500 during a postback called by a Button control that is in the page (not i...

ASP.NET Dynamic Data - Back Button

Hi all, I used .Net's dynamic data entity to implement a website that sits on top of my db (see http://msdn.microsoft.com/en-us/library/ee845452.aspx) In the List.aspx-View for a table, I am able to sort/filter the data of the gridview. After having clicked on a row's 'Details' link, I would like to provide the user a 'Back' button in ...