Back to Devexpress

The 'ReferenceError: 'X' is not defined' error message appears when the Control.Enabled property is set to false

aspnet-403765-troubleshooting-client-side-issues-reference-error-when-control-enabled-is-false.md

latest862 B
Original Source

The 'ReferenceError: 'X' is not defined' error message appears when the Control.Enabled property is set to false

  • Sep 15, 2023

Error Description

The “ReferenceError: X is not defined” error message appears when you try to access a DevExpress ASP.NET control whose Enabled property is set to false.

This error occurs because client scripts are not rendered for a control if its Enabled property is set to false. This means you cannot access the control on the client.

Solution

Use the ClientEnabled property to disable a control on the server and then make it available on the client.

See Also

The Difference Between the Enabled / Visible and ClientEnabled / ClientVisible Properties