473,698 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does viewstate getting send in httprequest.

Hi all,

Can anyone tell how viewstate is gets stored in subsequent http
request.

Does viewstate is getting send along with hptt request?

Any help will be truely appreicated.

Mar 3 '07 #1
2 1652
On Mar 3, 5:24 am, "archana" <trialproduct2. ..@yahoo.comwro te:
Hi all,

Can anyone tell how viewstate is gets stored in subsequent http
request.

Does viewstate is getting send along with hptt request?

Any help will be truely appreicated.
ViewState is sent as part of the body for the HTTP Post of the page.
If you look at the HTML source of your page, you can see the ViewState
hidden field and it's value. That value is then sent back to the page
along with the value of the other input elements in the page.

If you want to see the contents of the ViewState, you should use a
tool like Nikhil's K. WebDevHelper: http://projects.nikhilk.net/Projects/WebDevHelper.aspx

Hope this helps yout.

Mar 3 '07 #2
Indeed, Nikhil K's blog is the place to search for information (since
he is the guy who invented the thing). But basically, imagine that
ViewState is simply a base64 encoded string storing the state of your
current form. This string is by default stored in a hidden input in
the page called "__VIEWSTAT E" and in your HTML dump may look something
like:

input type="hidden" name="__VIEWSTA TE" id="__VIEWSTATE " value="/
wEPDwULLTEwbqZp A" />

After postback, the value is sent back to the server and state is
restored. This happens in the LoadViewState phase of the page, which
happens immediately after Init and before Load (Page_Load).

If you think this bloats the page, you have two options:

1) Disable ViewState altogether - however, you will need to invent
your own state persisting logic (typically, rebind everything upon
each request to the page)
2) Override the curiously called:

Page.LoadPageSt ateFromPersiste nceMedium
Page.SavePageSt ateToPersistenc eMedium

methods and store the ViewState in Session, Cache, etc, etc. This is
relatively hard to do, the following article has details:

http://www.codeproject.com/aspnet/Pe...tStatePage.asp

Mar 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2011
by: D. Shane Fowlkes | last post by:
I have a form in which clicking the submit button calls a "SaveData" sub rountine I wrote. The SaveData rountine inserts data from the form into a table and grabs the ID of the newly inserted record and stores it in a variable in the routine. The routine writes the data to the table just fine. But one of the last thing lines in my routine is this: ViewState("id") = intPurchaseOrderID The intPurchaseOrderID is the ID of the brand new...
7
2136
by: GS | last post by:
Hello, I'm receiving The state information is invalid for this page and might be corrupted error message when running code below. This happens on second post back. Why is it happening? My webpage contains 2 dropdowns controls and I save information entered by user in ViewState variable containing array ArrayList MyCoordinates = (ArrayList) ViewState ; if (MyCoordinates == null) { MyCoordinates = new ArrayList ();
4
2985
by: jeff.maildump | last post by:
Hi, I've got multiple xmlhttprequests which are in a loop. So this is the loop I have so far, with the closure given to me in a previous post: //------------------------------------------------------------------------------------- for (i=0; i<data.length; i++) { httpRequest = false; httpRequest = new XMLHttpRequest(); httpRequest.onreadystatechange = function(index) {
8
1614
Mayur2007
by: Mayur2007 | last post by:
Hello all, I am using javascript and ajax. i had writen the following javascript code. which runs fine with firefox but it is not work in Internet Explorer 6.0 tell me whats the problem. the java script code is as below function checkfortasks(url,id) { var httpRequest;
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.