Ticket Q293081
Visible to All Users

ASPxDateEdit - Disabled control (ClientEnabled) posts a postback data to the server side

created 14 years ago

I have this form:
<form>
<dxe:ASPxDateEdit runat="server" ID="BirthDate" Date="5/6/1985" ClientEnabled="false"/>
<p />Got: <%= Request.Form("BirthDate")%><p />
<input type="submit" value="Submit" />
</form>
If the user submits this form in IE 8, the page renders "Got: 5/6/1985" but in Firefox 3.6 it just renders "Got:".
Is there any way to change the behavior in IE to be the same as Firefox. I do not want the form value to submit if the control is disabled.

Show previous comments (1)
TV TV
Tzadik Vanderhoof 14 years ago

    Thanks for your speedy reply. But I have 2 issues with it:

    1. You did not address my observation that there is different behavior of IE vs. Firefox. In IE the value of the disabled ASPxDateEdit control is submitted but in Firefox it is not. It should not act differently in different browsers. Probably that is a defect of your control. Can you have the developers review this?
    2. I cannot use your suggestion of using a Label instead of ASPxDateEdit, because I want to be able to use the Client-Side API to enable and disable the control (using SetEnabled). Is there a solution for this requirement that will NOT submit the value for a disabled ASPxDateEdit control, no matter what the browser?
    DevExpress Support Team 14 years ago

      Hello Tzadik,
      To make our editors be consistent in different browsers, we do not disable an input element in the IE to allow users to apply disabled styles. When an editor has a disabled input tag, the browser will not allow applying custom styles to it.
      For the IE in particular, we make editors readonly.
      I see the inconsistent behavior between FireFox and IE when your code is used. However, I am not sure that it can be changed. If you want to disable our controls to prevent their values from being submitted to the server, you can disable an input element manually:

      JavaScript
      BirthDate.GetInputElement().disabled = "true";

      However, you should always remember that this approach might break your styles. in some browsers.
      Thanks,
      Vest

      TV TV
      Tzadik Vanderhoof 14 years ago

        thanks, vest

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.