Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onfocus postback problem

Status
Not open for further replies.

mattinckle79

Programmer
Jul 31, 2011
1
GB

Im using vs 2008 ( asp.net / vb.net )

I've got grid with editable textboxes on the rows ( 1 textbox per column ).
On focus of a textbox I need to have a postback to retrieve a related value and display it on screen but after the postback it loses the focus.
Is there anything i can do to keep the focus?? tried multiple things online but nothing working yet

if i manual set the focus back to the control, then it will just fire the onfocus event - and therefore enter a loop.

anyone got any ideas
 
Can you check for a specific value or if there is not value? Meaning, onFocus,check if the textbox.text = "", if it is, get the value, else, don't do anything. This will avoid the loop.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top