Results 1 to 3 of 3

Thread: Autopostback problem

  1. #1

    Thread Starter
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092

    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.

  2. #2
    Junior Member
    Join Date
    Sep 2003
    Posts
    16
    I realise this is simple, but many people miss it..

    Make sure on each of the controls you wish to check, you have:

    Code:
    runat="server"
    This tells the server to run the control from the server and then you can control upon editing.

  3. #3

    Thread Starter
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width