How to get the InnerText/HTML of a label control? RRS feed

  • Question

  • User-378245712 posted

    I would like to validate if a label control has innerTEXT/HTML through server-side. Because the AJAX password strength store the help status text through the InnerText/HTML property of the label control.

    Does anyone know how? I know it can be done through javascript but I want to validate it through server-side.


    Friday, July 20, 2007 11:11 AM


  • User-1902422195 posted
    Text/HTML inside labels isn't sent back to the server. The most common workaround for this problem is to include a hidden control and use javascript to update the value of the hidden control at the same time that you're updating the label. You can then read the value of the hidden control on the server-side.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 20, 2007 11:28 AM