Asp which control has focus




















All Rights Reserved. See Trademarks for appropriate markings. Load RadInput1. Focus End Sub. SetFocus RadInput1. Load Page. ClientID End Sub. FocusControl RadInput1. ClientID ; ScriptManager1. So there is no simple way to trap what textbox on my page has the curser on it using just vb code? I have trouble trying to find out where to put the java script code etc.

Lets just say I got a new project. I have 2 textboxes on the page and 2 buttons named gray and yellow. I click my mouse on one of the textboxes so that the curser is flashing and then I hit the gray button. The textbox backcolor is now gray. I dont know how to implement CSS's etc. Otherwise, you will have to rely one someone else to make your sites look nice and have the kind of interactive features you want.

Thank you, the above works but I would like to be able to push a button and then color the focused textbox. I dont want an automatic color change when focused. Just if the textbox has focus I have the option to color it by pressing a button. I basically have a web form with 10 text boxes on it with a save button. I need to be able to have the user click on a textbox and make it gray and then save it.

So when the user goes back to the record and the textboxes populate, the textbox the user made gray will still be gray. Can you tell us what should determine that a textbox should be gray? Use this example to tell us:.

The content you requested has been removed. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Web Forms. Sign in to vote. User posted Hi, I am trying to set the color of a textbox that has focus to gray. Something like this: focusedtextbox. LightGray Thanks! Download Microsoft Edge More info. Contents Exit focus mode. Focus Method Definition Namespace: System. Forms Assembly: System. Sets input focus to the control. Note Focus is a low-level method intended primarily for custom control authors.

Is this page helpful? Yes No.



0コメント

  • 1000 / 1000