473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Redirecting to a page with a querystring and an anchor reference

I am working on an application that displays a list of items (biglist.aspx).
With each item, there is a link that takes the user to another aspx page for
updating the specific details of that item (updatedetails.aspx). That page
has a button event that saves changes and then redirects back to the main
list.

Here's my issue -- the list page takes a parameter in the querystring. I
have set up anchor tags for each item within the list. Therefore, for
instance, a user clicks on a link that takes him to:

biglist.aspx?listID=100#Item4

Under this scenario, the querystring value for "listID" is 100, as it should
be. This link will then take him directly to the anchor tag for item 4. This
works great when the user clicks on a link to get to that page. However, in
my button event that saves the updates, I am trying to do a Response.Redirect
to the link above to take the user back to the list and the item he was
working on. When I do the Response.Redirect, however, the querystring value
for "listID" reads in as "100#item4", which is obviously incorrect.

I also don't think Server.Transfer would work, since I need the broswer to
see the anchor reference to automatically move down the page to the right
spot.

Any ideas on how to get the desired behavior? Thanks!
Nov 19 '05 #1
3 2465
Have you tried placing the bookmark before the query string?
biglist.aspx#Item4?listID=100

Cheers,
Steve Goodyear
Nov 19 '05 #2
Thanks for the suggestion. I hadn't tried that before, but when I did,

Request.QueryString["listID"].ToString()

brings back a null. It's as if moving the anchor reference makes it unable
to see the querystring.

Thanks,
Donny

"Steve Goodyear" wrote:
Have you tried placing the bookmark before the query string?
biglist.aspx#Item4?listID=100

Cheers,
Steve Goodyear

Nov 19 '05 #3
I'm having the same problem. Is there anybody with a solution?
I'm using the Page.RegisterStartupScript though for adding the javascript
"document.location.href='#test';"

This is all in a user control, who is on an aspx page
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Fawke101 | last post by:
Hi there, I have a ASP/SQL 7.0 Application and i have a page (page1.asp) that has 2 ways of accessing it. 1 is through a hyperlink on another page (page2.asp), that inserts a value into a...
3
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1...
2
by: Simon Harvey | last post by:
Hi, This is a very typical requirement so I'm sure the answer is very straightforward. If a user tries to get to a secure directory, they can be a sent to a login page automatically. Once the...
4
by: Terry Mulvany | last post by:
I have a 'BasePage' (BasePage.cs) derived from System.Web.UI.Page that all my pages inherit from. I need to set some properties (either in the OnInit or constructor) based on a potential...
0
by: Goober at christianDOTnet | last post by:
I'm wanting to fix the following on a web page without really re-inventing anything. What I have is a vb web page with a radiobuttonlist where I can pick Current or History year. Underneath...
2
by: Gary Coutts | last post by:
Hi, I am have problems redirecting from a login page. The login page is simple, with just 2 textboxes and one button. On the button click the routine below is called: I am using: Visual...
2
by: pbd22 | last post by:
can somebody tell me how to set a parameter of my current URL without using response.redirect? I am trying to set a parameter - ResponseId = 4 inside a while loop. is this possible? also,...
1
by: DaveRook | last post by:
Hi I am currently using a page redirect which is the wrong thing to do (I think). I am trying to be clever and work on a search algorythm (if that's the correct term). We have a series...
9
by: joe | last post by:
Hello, I have a website set up on our server that is especially for errors. When another website encounters an error, it will redirect to this site with error details in the querystring. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.