Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Response.Redirect and locating to specific area on page

Response.Redirect and locating to specific area on page

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestionlearning
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Charles I Dont Care About The Back End Sustek
    wrote on last edited by
    #1

    1. Page lists courses, each with a link to the course detail 2. User clicks on course detail, shows new page with detail 3. User clicks on "Add course"; after it adds the course it needs to response.redirect back to the list of courses, to the specific area on the page from whence they came I have tried putting an anchor tag on the page like this: I tried the following lines of code: 1. Response.Redirect("mypage.aspx#COURSE123?type=daily&day=2004-10-17") or 2. Response.Redirect("mypage.aspx?type=daily&day=2004-10-17#COURSE123") For #1, my application could not find the "type" query string parameter so did not navigate to the appropriate control on the page. For #2, I got an error because it thought that "#COURSE123" was part of the "day" query string parameter. What am I doing wrong? ___________________________________________________________________ Ultimate wisdom from the WebMaster: "You know what...I just don't like that."

    D W 2 Replies Last reply
    0
    • C Charles I Dont Care About The Back End Sustek

      1. Page lists courses, each with a link to the course detail 2. User clicks on course detail, shows new page with detail 3. User clicks on "Add course"; after it adds the course it needs to response.redirect back to the list of courses, to the specific area on the page from whence they came I have tried putting an anchor tag on the page like this: I tried the following lines of code: 1. Response.Redirect("mypage.aspx#COURSE123?type=daily&day=2004-10-17") or 2. Response.Redirect("mypage.aspx?type=daily&day=2004-10-17#COURSE123") For #1, my application could not find the "type" query string parameter so did not navigate to the appropriate control on the page. For #2, I got an error because it thought that "#COURSE123" was part of the "day" query string parameter. What am I doing wrong? ___________________________________________________________________ Ultimate wisdom from the WebMaster: "You know what...I just don't like that."

      D Offline
      D Offline
      David Flores
      wrote on last edited by
      #2

      Well you could pass the information in a session variable. When the page loads, check the variable, if variable exists then display the apprpoiate information. Just a thought.

      C 1 Reply Last reply
      0
      • D David Flores

        Well you could pass the information in a session variable. When the page loads, check the variable, if variable exists then display the apprpoiate information. Just a thought.

        C Offline
        C Offline
        Charles I Dont Care About The Back End Sustek
        wrote on last edited by
        #3

        Good idea; how then do I scroll to a specific spot on the page? ___________________________________________________________________ Ultimate wisdom from the WebMaster: "You know what...I just don't like that."

        1 Reply Last reply
        0
        • C Charles I Dont Care About The Back End Sustek

          1. Page lists courses, each with a link to the course detail 2. User clicks on course detail, shows new page with detail 3. User clicks on "Add course"; after it adds the course it needs to response.redirect back to the list of courses, to the specific area on the page from whence they came I have tried putting an anchor tag on the page like this: I tried the following lines of code: 1. Response.Redirect("mypage.aspx#COURSE123?type=daily&day=2004-10-17") or 2. Response.Redirect("mypage.aspx?type=daily&day=2004-10-17#COURSE123") For #1, my application could not find the "type" query string parameter so did not navigate to the appropriate control on the page. For #2, I got an error because it thought that "#COURSE123" was part of the "day" query string parameter. What am I doing wrong? ___________________________________________________________________ Ultimate wisdom from the WebMaster: "You know what...I just don't like that."

          W Offline
          W Offline
          WoutL
          wrote on last edited by
          #4

          Hi Charles, Place the anchor on mypage.aspx like:

          <a name="COURSE123" />

          Then link to the page like 1.

          Response.Redirect("mypage.aspx#COURSE123?type=daily&day=2004-10-17")

          You made an error in the anchor. Wout Louwers

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups