Re: Form postbacks not in viewstate?
From: Patrice (nobody_at_nowhere.com)
Date: 05/13/04
- Next message: Roy Chastain: "Re: Page output display must be refreshed?"
- Previous message: Steve Drake: "Streaming from another server"
- In reply to: foldface_at_yahoo.co.uk: "Form postbacks not in viewstate?"
- Next in thread: Teemu Keiski: "Re: Form postbacks not in viewstate?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 May 2004 11:33:13 +0200
1) This is not an ASP.NET feature. When you press a submit button, the
browser sends a HTTP request to the server. This request contains the value
of all non disabled, named fields that are in your form.
2) The viewstate is an hidden field (as such it is posted by the browser
when the submit button is hit allowing the server to read the viewstate).
ASP.NET is a clever hack but just uses client side what was available
previously (HTML, HTTP).
Patrice
<foldface@yahoo.co.uk> a écrit dans le message de
news:acb840c8.0405130041.41d228b7@posting.google.com...
> Hi
> I have only just become aware that form values posted to the server
don't
> need to be preserved in viewstate because asp.net preserves them anyway
> separately from this.
> 2 questions
> (1) What is the mechanism that preserves them? (Purely for academic
interest)
> (2) I have a property on a control that is added to the viewstate. With
> trace on and some code that shows the contents of the viewstate I see
> that information both in the viewstate and in the "Form Collection"
section
> of the page trace. Is it in both or am I being mislead?
> NB My understanding of the "Form Collection" section is that it shows
all
> the values posted back to the server and viewstate is just one of those
values.
>
> Ta
> F
- Next message: Roy Chastain: "Re: Page output display must be refreshed?"
- Previous message: Steve Drake: "Streaming from another server"
- In reply to: foldface_at_yahoo.co.uk: "Form postbacks not in viewstate?"
- Next in thread: Teemu Keiski: "Re: Form postbacks not in viewstate?"
- Messages sorted by: [ date ] [ thread ]