Ticket Q276621
Visible to All Users

ASPxTextBox ClientEnabled="false" loses value after postback

created 14 years ago

Please run the attached sample web form with Microsoft Internet Explorer 8, FireFox 3.6 and Google Chrome 6.0 and try the following:

  1. Click on the button "Fuente". A client-side process runs and sets txtRefFuente equal to "1".
  2. A PopUp window will appear with 2 buttons: "Asignar" and "Cancelar".
  3. At this moment you can see txtRefFuente with a value of "1".
  4. Click on the button "Asignar". The popup is closed and a server-side process is executed.
  5. The value of txtRefFuente is lost when the form is run with Chrome and FireFox but it is kept if the web form is run with Microsoft Internet Explorer and Opera.
    Is this an issue that has to do with DevExpress controls?
    Respectfully,
    Jorge Maldonado
Show previous comments (7)

    I performed and additional test on this issue so I wrote a small web form that includes an ASPxTextBox and 2 ASPxButtons. Such test includes the following:
    TEST 1:
    * Textbox's ClientEnabled property="false".
    * Button1's AutoPostback="false" with CLIENT-SIDE code to set textbox's value to "1".
    * Button2 only performs a postback.
    * The value of the textbox IS lost after postback.
    TEST 2
    * Textbox's ClientEnabled property="false".
    * Button1's AutoPostback="true" with SERVER-SIDE code to set textbox's value to "1".
    * Button2 only performs a postback.
    * The value of the textbox IS NOT lost after postback.
    In both cases I first clicked Button1 to set the textbox's value to "1" and then clicked Button2 to perform a postback.
    So, I see that the issue is present when assigning a value to the textbox through client-side code but not when its value is set through server-side code.
    I will appreciate your comments.
    With respect,
    Jorge Maldonado

      Also, can you please tell me where to find which DevExpress controls have an <input /> element?
      Regards,
      Jorge Maldonado

        I guess I know which controls have an input element. If a control has a client-side GetInputElement method then is has an input element. Is this correct?
        In this post we have been talking about the issue of the ClientEnabled property and a postback using FireFox and Chrome; the value of any control with an <input /> element is not sent to the server by these internet browsers. Does this also apply to the client-side SetEnabled method? It seems to me that it does not because I have tested such a situation and I did not get any trouble.
        Please advice.
        Best regards,
        Jorge Maldonado

        Answers approved by DevExpress Support

        created 14 years ago (modified 12 years ago)

        Hello Jorge,
        Please accept our apologies for this delay. Here are answers to your questions:

        1. Concerning your tests: You are right, the ASPxTextBox with ClientEnabled="false" does not post its value to the server during a postback. However, it is possible to set its value on the server side during a postback;
        2. >> I guess I know which controls have an input element. If a control has a client-side GetInputElement method then is has an input element. Is this correct?
          Yes, it is correct.
        3. >> the value of any control with an <input /> element is not sent to the server by these internet browsers. Does this also apply to the client-side SetEnabled method?
          We use different approaches to disable our editors via the ClientEnabled property. For the FireFox and WebKits browsers, the disabled="disabled" attribute is used to prevent an editor from being used. When you submit a form to the server, the value of a "disabled" input is not posted. If it is necessary to restrict access to some editor (without applying special styles), manipulate the ReadOnly property.
          Thanks,
          Mike

          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.