moving to an anchor point programmatically

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default moving to an anchor point programmatically

    Hi,
    Does anyone know how to programmatically move to a anchor point (a tag). I
    am using vb.net. When the user presses a server-side control on the webpage,
    I need to do some server processing and then I would like the resultant page
    to have scrolled down half-way to the relevent part. Any help much
    appreciated.


    Craig Phillips Guest

  2. Similar Questions and Discussions

    1. Changing anchor point on existing path in Illustrator
      I want to know if you can change the handle bars on a point that is already in an enclosed path (so you can move each bar to different angles instead...
    2. CS: Can't select type anchor point after baseline shift
      After I do a baseline shift on point text, I can no longer select the text object by its anchor point. Smart guides recognizes the point as an...
    3. Anchor point and frameset
      Hi Everybody Is it possible to use anchor points along with frames (as frames in html)? If it is, how is it done? I'm really looking forward to...
    4. Linking to an anchor point in a framed page.
      I am using an image as a link, which has an 'onMouseUp="MM_openBrWindow' behavior attached. The newly opened window (named; 'help') uses frames. I...
  3. #2

    Default Re: moving to an anchor point programmatically

    When the page posts back, use RegisterStartUpScript() to add a script like
    the following to your page, to be run as soon as the page loads:

    <script type="text/javascript"><!--
    document.location = "#tagName";
    // --></script>

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    [url]http://www.takempis.com[/url]
    Some things just happen.
    Everything else occurs.

    "Craig Phillips" <craigp@smallfry.freeserve.co.uk> wrote in message
    news:uM1m%23DVQDHA.3700@tk2msftngp13.phx.gbl...
    > Hi,
    > Does anyone know how to programmatically move to a anchor point (a tag). I
    > am using vb.net. When the user presses a server-side control on the
    webpage,
    > I need to do some server processing and then I would like the resultant
    page
    > to have scrolled down half-way to the relevent part. Any help much
    > appreciated.
    >
    >

    Kevin Spencer Guest

  4. #3

    Default Re: moving to an anchor point programmatically

    The easy way is to do a response.redirect to that spot:

    Response.Redirect("mypage.aspx#tagName")

    Note, however, that this forces two calls from the client. Not a problem if
    you are using viewState and do not have a very large viewState, but not
    optimal in all situations. Note, also, that this is largely an HTML/HTTP
    problem.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    Author: ADO.NET and XML: ASP.NET on the Edge

    ************************************************** **************************
    ****
    Think Outside the Box!
    ************************************************** **************************
    ****
    "Craig Phillips" <craigp@smallfry.freeserve.co.uk> wrote in message
    news:uM1m%23DVQDHA.3700@tk2msftngp13.phx.gbl...
    > Hi,
    > Does anyone know how to programmatically move to a anchor point (a tag). I
    > am using vb.net. When the user presses a server-side control on the
    webpage,
    > I need to do some server processing and then I would like the resultant
    page
    > to have scrolled down half-way to the relevent part. Any help much
    > appreciated.
    >
    >

    Cowboy \(Gregory A. Beamer\) Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139