PagesSection.RenderAllHiddenFieldsAtTopOfForm Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether all system-generated hidden fields are rendered at the top of the form.
public:
property bool RenderAllHiddenFieldsAtTopOfForm { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("renderAllHiddenFieldsAtTopOfForm", DefaultValue=true)]
public bool RenderAllHiddenFieldsAtTopOfForm { get; set; }
[<System.Configuration.ConfigurationProperty("renderAllHiddenFieldsAtTopOfForm", DefaultValue=true)>]
member this.RenderAllHiddenFieldsAtTopOfForm : bool with get, set
Public Property RenderAllHiddenFieldsAtTopOfForm As Boolean
true
if system-generated hidden fields are rendered at the top of the form; otherwise, false
. The default is true
.
- Attributes
You can use the RenderAllHiddenFieldsAtTopOfForm property to specify that some system-generated hidden fields are rendered at the end of the form.
In versions of ASP.NET earlier than the .NET Framework 3.5 SP1, ASP.NET renders some hidden fields (for example, __VIEWSTATE
) at the top of the form. Other hidden fields (for example, __EVENTVALIDATION
) are rendered near the bottom of the form, just before the closing </div>
tag. By default, in ASP.NET 3.5 SP1, all system-generated hidden fields are rendered at the top of the page. This makes sure that the information in these fields is sent to the server even if a postback is performed before the page has finished loading. If RenderAllHiddenFieldsAtTopOfForm is set to false
, performing a postback before the page has finished loading can cause an "Invalid postback or callback argument" error.
Note
Although the property name indicates "all hidden fields," user-created hidden fields are not affected by settings for this property.
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: