473,811 Members | 2,540 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To: redirect to current URL with new parameters

I have a toolbar aspx page in a frameset. On the toolbar is a dropdownlist.
The frameset is launched from an outside source and comes in with a specific
parameter for the module desires, like...
http://myurl.com/frameset.asp?th emod="A"

The dropdownlist contains the current selected module (A) and a list of
other choices (B,C,D, etc.). When a user selected a different module I want
the main URL reloads with a new param, like...
http://myurl.com/frameset.asp?th emod="B"

My questions are;

1) Is there an easy way to reference the current URL? Without the original
param? Or do I need to parse it?

2) I have a case select for ach of the possible modules. Would a
response.redire ct be the best way to relaunch the frameset? and since it's
occuring from a the top frame page, how would I do a response.redire ct to
reload the main frameset from one of the frame pages?

Thanks, (I'm very new to ASP.NET)

Tony Z.
Nov 18 '05 #1
1 2833
Check the ServerVariables collection. I believe the one you are looking for
is Script_Name. That should refer to the page itself without the
querystring.

You can't do a response redirect to other frames though, it will only
redirect the current page/frame location.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Tony Zoccolillo" <to*****@hotmai l.com> wrote in message
news:uZ******** ******@TK2MSFTN GP12.phx.gbl...
I have a toolbar aspx page in a frameset. On the toolbar is a dropdownlist. The frameset is launched from an outside source and comes in with a specific parameter for the module desires, like...
http://myurl.com/frameset.asp?th emod="A"

The dropdownlist contains the current selected module (A) and a list of
other choices (B,C,D, etc.). When a user selected a different module I want the main URL reloads with a new param, like...
http://myurl.com/frameset.asp?th emod="B"

My questions are;

1) Is there an easy way to reference the current URL? Without the original param? Or do I need to parse it?

2) I have a case select for ach of the possible modules. Would a
response.redire ct be the best way to relaunch the frameset? and since it's occuring from a the top frame page, how would I do a response.redire ct to
reload the main frameset from one of the frame pages?

Thanks, (I'm very new to ASP.NET)

Tony Z.

Nov 18 '05 #2

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

Similar topics

6
21076
by: Omid | last post by:
Hi. I have problems when I try to redirect everything that is sent to cout to a file. I have one piece of code that works and one that does not work. The only difference is which headers I use. What the code does: * First writes "This is sent to prompt" to prompt.
10
7947
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into the URL, in the format http://yourapplicationpath/(Session.SessionID)/... which saves numerous headaches when it comes to storing state across page requests and sessions.
4
10118
by: Martin | last post by:
I know this might seem like an odd question. I've got a page that has a few url parameters. There's a couple of modes the page can be entered in, with correspondingly different urls params. Once on the page, typically the user causes a post back to occur. I then want the url to reflect the new mode of the page. Right now I am doing that with a redirect to the same page, but with different url parameters, however this is inefficient...
13
4709
by: Tim | last post by:
Hello, Is there a way to "cancel" a response.Redirect? For example, in the code below, could I insert anything in the Catch statement that would cancel the redirect and resume flow after the try-catch? Try Response.Redirect(strPage) Catch ex1 As Threading.ThreadAbortException ex1 = ex1 'Cancel Respone here
3
3486
by: michael_vanommeren | last post by:
I have two web applications that I am working with and I am trying to do a Response.Redirect from one to the other. They are setup as separate web applications on the same IIS server. If I go directly to the second application in a browser, all of my events fire correctly. However, if I have the first application do a Response.Redirect to the second, for some reason none of my events on the second application ever get fired. After I...
3
2285
by: neil_pat | last post by:
I have a stored procedure which returns a value of between 0 and 4. I want the user to press a button to receive feed back on their last input. The save button takes the input and saves it to the database. The feedback button runs a stored proc that takes the saved data from the table, performs a logical calcualation and returns the right value between 0 and 4. Depending on the value returned the redirect page is different. Here is...
8
3511
by: Laith Zraikat | last post by:
I am trying to invoke a post request from code behind of an asp.net page using "WebClient" object, and I want the user to be redirected to the action url as well. So far Ive been able to send the post and get the response. using this code: Dim PostData as string Dim ActionURL as string Dim myWebClient As WebClient = New WebClient
5
6053
by: Seb | last post by:
Hi, We have a page in VB.NET redirecting to an external site. Example: http://mysite.com/redirect.aspx?url=http//externalsite.com/their-page.asp The target page on the external site (http//externalsite.com/their- page.asp in this example) also redirects to another page (let's say "their-page2.asp") on their website).
1
5924
by: zizi2 | last post by:
I have a form that I want to redirect to another page after clicking the submit button. It works well (please see the code below) except that it cancells my pop-up message, it goes the redirected page without showing the popup. Please help: private void Submit_Click(object sender, System.EventArgs e) { if( filMyFile.PostedFile.ContentLength != 0 ) { string strFilename; strFilename =...
0
9730
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
10651
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
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...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
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
5555
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...
0
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3868
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
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.