-
Autopostback problem
when a user edits their details on my site, i want to check if they change their address, at the moment i do this by using the OnTextChanged event of the textboxes. I can only get this to work with autoPostback set to true, which works but my problem is that after the autopostback focus returns to the top of the page making the page very irritating to use.
Is there a way of recording which control had focus and then setting focus to the next control in the tab order after the postback? or is there another way to achieve want i'm doing?
Tom.
-
I realise this is simple, but many people miss it..
Make sure on each of the controls you wish to check, you have:
This tells the server to run the control from the server and then you can control upon editing.
-
yep all controls have runat=server but it doesn't catch the change unless i have autopostback=true which makes that control lose focus. I've since managed to rectify this by adding smartnavigation=true to the page directive but that only returns focus to the control that posted back.
Anyone know anyway to give control to the next control in the tab order after the autopostback?