473,799 Members | 3,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?li stID=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.Redire ct
to the link above to take the user back to the list and the item he was
working on. When I do the Response.Redire ct, 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 2486
Have you tried placing the bookmark before the query string?
biglist.aspx#It em4?listID=100

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

Request.QuerySt ring["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#It em4?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.RegisterSt artupScript though for adding the javascript
"document.locat ion.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
3566
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 querystring and page1.asp output data from sql according to the relevant value in the hyperlink = ***page2***
3
10837
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 which has to parameters passed to it from another Web page Parameter # 1 dbid and Parameter # 2 reportid. I know that I can access the values of the parameters from the code behind .aspx.cs using Request.QueryString so
2
1006
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 user has been authenticated, a call to, FormsAuthentication.RedirectFromLoginPage() will send the user to the page he had been originally trying to reach.
4
5096
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 Request.Cookie or a name/value pair in Request.QueryString. But I am getting a 'System.NullReferenceException: Object reference not set to an instance of an object.' error when I try to view any aspx derived from this BasePage. I am using...
0
1244
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 that is a listbox that has a set of reports in it, some for current year, some for history year. If Current year is chosen, 6 reports (depending on user access level) are listed, on the History one, 2 are listed (also depending on user access...
2
1995
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 Studio 2003 Version 7.1.3008 Framework 1.1 Version 1.1.4322 SP1 Windows XP Pro Version 2002 SP2
2
1365
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, is it possible to replace the value of the ResponseId parameter to, say "5" in the same way?
1
1509
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 of part numbers that start with 4 - 6 numbers, then the rest are customer specifiable. A good (made up) example could be the part number Honda-4dr-Dsl-Auto This is probably quite obvious - A honda, 4 door, Diesel and Automatic. An example of my...
9
1947
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 error website process the querystring and displays a nicely formatted error message with details. The problem I am having is that the querystrings are getting too long and I am unable to successfully redirect to the error site. What are my...
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10251
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10228
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7565
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.