Asp.Net AutoPostback and control focus

Discussion in 'ASP .Net' started by robin9876@hotmail.com, Jun 21, 2006.

  1. Guest

    In Asp.Net v1.1 web form I have a number of controls which have the
    autopostback enabled. Is it possible after the autopostback has run
    that the control that caused the autopostback to get the focus?
     
    , Jun 21, 2006
    #1
    1. Advertising

  2. Hi, maybe you can use smartnavigation.
    See http://geekswithblogs.net/ranganh/archive/2005/04/25/37616.aspx

    Note that this solution only works on IE.
    A cross-browser compatible solution is to use shomething like this:
    Page.RegisterClientScriptBlock("focus",
    "document.<id-of-your-control>.focus();")

    --
    Bent Kristiansen
    bent.kristiansen(AT)bekk.no


    "" wrote:

    > In Asp.Net v1.1 web form I have a number of controls which have the
    > autopostback enabled. Is it possible after the autopostback has run
    > that the control that caused the autopostback to get the focus?
    >
    >
     
    =?Utf-8?B?QmVudCBLcmlzdGlhbnNlbg==?=, Jun 21, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mad Scientist Jr
    Replies:
    2
    Views:
    5,335
    Mad Scientist Jr
    Jun 29, 2004
  2. Jason
    Replies:
    4
    Views:
    1,665
    Jason
    May 7, 2007
  3. Pai

    AutoPostBack and Focus...

    Pai, Nov 12, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    128
    susie
    Nov 14, 2003
  4. Asp.Net AutoPostback and control focus

    , Jun 21, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    129
    Nathan Sokalski
    Jun 23, 2006
  5. Roger
    Replies:
    3
    Views:
    360
Loading...

Share This Page