HtmlForm.SubmitDisabledControls Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets a Boolean value indicating whether to force controls disabled on the client to submit their values, allowing them to preserve their values after the page posts back to the server.

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in system.web.dll)

public:
virtual property bool SubmitDisabledControls {
	bool get ();
	void set (bool value);
}
/** @property */
public boolean get_SubmitDisabledControls ()

/** @property */
public void set_SubmitDisabledControls (boolean value)

public function get SubmitDisabledControls () : boolean

public function set SubmitDisabledControls (value : boolean)

Property Value

true if controls disabled on the client are forced to submit their values; otherwise, false. The default value is false.

Use the SubmitDisabledControls property to specify whether to force controls disabled on the client to submit their values when the page posts back. This allows the disabled controls to preserve their values after the page posts back to the server. When the SubmitDisabledControls property is set to false, controls on the form that have been disabled using client script will not be submitted to the server the next time the page posts back. As a result, any values stored by the disabled controls are lost. To allow the disabled controls to preserve their values after the page posts back to the server, set the SubmitDisabledControls property to true.

The following code example demonstrates how to set the SubmitDisabledControls property on a form to true to cause controls disabled by client script to maintain their values after the page posts back to the server. In this example, if you set the SubmitDisabledControls property to false and then click the Post back button, the text in the HTML text box is lost and the HTML check box is no longer selected.

No code example is currently available or this language may not be supported.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: