Archives

Archives / 2010 / July
  • Set focus to a TextBox (in a ModalPopupExtender)

    I have a web page where couple of ModalPopupExtender and Panel exist, and I want to set focus to TextBox inside the corresponding pop up window when user click the target button accordingly. I think it's a common requirement to set the focus to a specific TextBox immediately when user open up the window. However, I always get the error message "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus".

  • Turn TextBox.Text to CAPITAL or small letter in CSS

    I'm looking for a simple function that turn the text of a TextBox into capital or small letter, but most of the JavaScript I found are clumsy because of the incompatibility of script (including the inconsistent behavior of event.keyCode and event.which in different browser).