locked
Losing textbox focus which is under the Gridview after the postback happen RRS feed

  • Question

  • User-1107266460 posted

    I have gridview control which contains the text box control.

    For every 5 minutes i am forcefully calling the save method by using the timer control. (Tick event)

    It is saving data , but losing the textbox focus (which is under the grid view).

    Help me on this to put the focus back to the control (where the control had lost the focus)

    Thanks in advance!

    Saturday, December 1, 2012 3:45 AM

Answers

  • User-1716253493 posted

    try this

    http://www.codeproject.com/Articles/17571/Maintain-focus-between-postbacks-in-ASP-NET-2-0-al

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 1, 2012 4:17 AM

All replies

  • User-1716253493 posted

    try this

    http://www.codeproject.com/Articles/17571/Maintain-focus-between-postbacks-in-ASP-NET-2-0-al

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 1, 2012 4:17 AM
  • User-383688373 posted

    Call the Focus() method of the textbox at the click event handler of the timer you are using for the update.

    Hope this helps?

    Sunday, December 9, 2012 8:37 AM