No response from response.redirect

Hi,

my asp.net project has atleast 10 webforms and for navigation the response.redirect was working fine till today. It stopped working in one of the pages but stills fine in the other pages. eg. the CANCEL button loads the previously navigated page. All CANCEL except one are working. I checked the button click event, put labels with messages in them; the labels get posted when the button is clicked; but when i remove the labels and put in the response.redirect("PAGE NAME") it stopped working;
i even put the wrong path in the response.redirect, still the errorhandler or any other errors gets displayed.
Any pointers????
thanks in advance,
Jay
0
sjdutta
11/13/2003 4:56:45 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

5 Replies
1151 Views

Similar Articles

[PageSpeed] 44

what error are you getting?

if you right-clik in the browser and select properties, does the URL show the originating page or the forward page?
0
rox
11/13/2003 7:14:39 PM
can you post the code in your cancel button click event?
Hey! It compiles! Ship it!

Cheers,

Venugopal Mallarapu.

Visit : My Blog
0
venumg
11/13/2003 7:15:58 PM
no error; just a blank page with the URL still showing for the page from which the button was clicked.

for eg. u clicked on CANCEL from A.aspx, even after CANCEL click, the path to A.axpx is shown at the top. Before today, it used to lead me to B.aspx
0
sjdutta
11/13/2003 7:18:29 PM
the best part is the code works good when i test it in the dev env(when running in the .net env) but the moment when users access from the web it fails (all other buttons and redirects are working fine)

the code:
---code start----
Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
On Error GoTo ErrorHandler_Cancel
Response.Redirect("StartPage.aspx")
Exit Sub
ErrorHandler_Cancel:
strError = ""
strError = "Problem Exists with the application; Please contact your Database Admin/Web Admin"
Session("Error_Message") = strError
Response.Redirect("error.aspx")
End Sub
---code end---
0
sjdutta
11/13/2003 7:24:24 PM
Why are you still using the traditional ASP error handling....now error handling has become more efficient and easy to use...

use TRY...CATCH...FINALLY constructs...
Also you can use the ErrorPage attribute in your @Page directive within your aspx file...
however coming to your question...everything seems to be just like the way you said...
can't think of any problem with it....
Hey! It compiles! Ship it!

Cheers,

Venugopal Mallarapu.

Visit : My Blog
0
venumg
11/13/2003 7:47:14 PM
Reply:

Similar Artilces:

How can I get a Response.Write and Response.Redirect to work one following the other?
I have a button on my webform that needs to perform 2 operations.  First it must open a new window which I usually do like this: sJScript = "<script>window.open('Form01.aspx?ID=0&Parent=5', '', '');</script>"Response.Write(sJScript)Second it must redirect the current page (not the newly opened one).  I usually do that like this:Response.Redirect("Form02.aspx?ID=6")My problem is, in this case, I must do both with one button click and they interfere with each other.  I've tried flushing/ending the response object in various places, re ordering things, etc but n...

Response.write or Response.redirect?
I have a code using Response.Write and javascript to open another page, the code looks like this: Response.Write("<Script language='javascript'>window.open('http://10.10.30.25:8080/Orders/Orders.aspx?vloc=fac&vflag=" & Session("varflag") & "&vid=" & Session("FacilityID") & "&vrepid=" & Session("varid") & "');</script>") it send me to another page in a different window or tab. I want to open it in the same window or tab as in Response.Redirect, but in Respons...

Should we use Response.Redirect ( url, true) or Response.Redirect ( url, false) ?
Normally most of the time we use Response.Redirect (url). How is this different from Response.Redirect ( url, true) or Response.Redirect ( url, false) ? Also, what is the best form of Redirect to use when going to another page?sun21170 The second parameter of Response.Redirect is endResponse which is boolean value that indicates whether to stop running the current page.It depends on if you want to keep it alive or stop it.Thanks Mark post(s) as "Answer" that helped youElectronic ScrewWebsite||Blog||Dub@i.net In what situation, would someone pass a true for the endResponse ...

Using Response.Redirect() after Response.Flush()
I wonder if anyone might be able to help me with a problem I'm having in redirecting to a new page after calling Response.Flush(); The problem has arisen as a side effect of implementing a "Please Wait..." page that displays when clicking on a Search button. The following code is executed when the button's Click event is run: private void btnConfirm1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { btnConfirm1.Visible = false; Response.Buffer = true; FileStream oFile = new FileStream(Request.PhysicalApplicationPath + "/Con...

Response.Redirect after response.OutputStream.Write?
I'm using the Wrox Docs module from Building An ASP.NET Intranet. This code outputs the doc from the DB to the client Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ItemID As Integer = -1 Dim strTable As String = "parent" Dim DocsSec As New WroxDocSecurity() 'comment this code if you don't want to lock down the download process If Not (DocsSec.HasDocPermissions(DocumentPermissions.DownloadandViewOnly, Request.Params("key"))) _ ...

Should it be Response.Redirect("~/NextPage.aspx") or Response.Redirect("NextPage.aspx") ?
Hi all,For all references to pages and images that are in the same directory as the current ASPX page, is it necessary to use the "~/" prefix to the pages? Both seem to work, although at times when I upload my code to a shared hosting environment, having the "~/" causes the page to error out.Which one is correct and loads faster?Thanks.  There is a difference between the two. the "~/" means starting from the Application root. Let's say you have this file structure. approot/page1.aspx approot/subfolder/page1.aspx approot/subfolder/page2.aspx If I do Response.Redirect("page1.aspx") ...

Response.write and response.redirect working together.
In my If then else statement I have 2 statements that are if true i need to pop up a message box and then when they hit ok, redirect them to another page.  so here is the statements and below that it show how I tried to use some code in the statment, but what happens is on the second statement the pop-up will not come up but it will wait 10 seconds and then redirect itself. ElseIf txtStatus.Text = "AGR PERM" Or txtStatus.Text = "AGR TEMP" Then       Page.RegisterStartupScript("LoadFunction", "<script type='text/ja...

Response.Redirect & Response.Write issues
I have code in my image click event which opens a new window when the end user clicks on the image. I need a new page/tab to open up and below is one version of how i do it. The issue l have is this always get stopped by the popup blocker and l want it to open up a new tab without forcing the popup or loosing the initil page!! protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { Code here connects to Access and does its job then below is actioned......... try { conn.Open(); sdc.ExecuteNonQuery(); st...

Response.Redirect not redirecting
 Hello all, I am trying to use the sample code for testing whether or not a browser accepts cookies (http://msdn.microsoft.com/en-us/library/ms178194.aspx). Unfortunately, I can not get the cookie test page to redirect back to the original page.  I have stripped away everything but the response.redirect statement and tried firing the cookie test page by itself.  The page loads fine, but won't redirect. Here is my current code: Imports System.WebPartial Class CookieAcceptanceTest    Inherits System.Web.UI.Page    Sub Page_Load()&...

Whic one correct? Between Response.Redirect(@"~\Default.aspx") and Response.Redirect(@"~/Default.aspx")
It seems the both  Response.Redirect(@"~\Default.aspx") and Response.Redirect(@"~/Default.aspx") can work well, but could you tell me which one is correct? Thanks! SuperCool Multiple ZIP - A utility to unzip multiple files and work with multiple zip filesSuperCool Random Number Generator  common practice is to write it like Response.Redirect(@"~/Default.aspx") Thanx, [KaushaL] || BloG || Profile || Microsoft MVP"I would love to change the world, but they won’t give me the source code"Don't forget to click "Mark as Answer" on...

I wrote code Response.Redirect then page is not redirected to reqquested page ( ajax.net)
I wrote code Response.Redirect then page is not redirected to reqquested page  (with ajax.net) make sure that your target URL is valied and correct... or the problem might be from your browserRegards...Nassar, RamiMy Blog || E-Mail Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. dear, just paste the code so that we can assist u accordinglyKind Regards,Saurabh Sharmaonly dead fish swim along the flow of river, learn to make yo...

Getting content from http response ? (http-on-examine-response)
Hi everyone, I'm writing an extension that inspects the http response content received from one given http server. So far I've tried to use the notification "http-on-examine-response" mechanism which allows me to inspect http headers from the response, but I don't have access to the actual content of the response. Indeed, you only have access to the nsIHttpChannel interface, which only has methods to get the headers. Could anyone point me to the right direction on how to access the http content please ? Thanks in advance, Best regards, Mfenetre wrote: ...

differnence between Response.Redirect() and Server.Transform() Flow between Request and Response
HiWhat is the differnence between Response.Redirect() and Server.Transform() Some body telling Response.Redirect will increase one request between client and Web Server Can anyone explain detail the Flow.(between Request and Response) Regards,Janakaraj   Server.Transfer just tells ASP.NET to now move to a new page, much like setting focus. The client is not aware of this at all so the URL stays the same. This can be a disadvantage.Response.Redirect actually tells the client we are going to redirect your request to a new page hence there is extra overhead in adding new header...

Using Response.Redirect and Response.Write from flat class file
Setup: I developed an interface that holds certain functions that are shared between some users in my system. The different users are grouped into classes that implement that interface. Problem: In some instances the implementations of this interface include a mere write to the screen or a redirect. However, when I attempt to do something like Response.write or Response.redirect from those classes, I am getting an error that says "Response is not Available in this Context" Question: Is what I am trying to do possible and if so, how do I correct this problem. ...

Web resources about - No response from response.redirect - asp.net.getting-started

Responses to the Ebola virus epidemic in West Africa - Wikipedia, the free encyclopedia
Organizations from around the world have responded to help stop the ongoing Ebola virus epidemic in West Africa . In July 2014, the World Health ...

Cop's response to "loud" teens playing basketball goes viral
Nearly 5 million watch dashcam video of police officer's unique "style of policing"

IDG Contributor Network: HealthTap enables (dare I say it?) the Uberization of medical response
The great thing about Uber and other on-demand services is that they flex according to demand (and, yes, I do realize that is a fairly self-evident ...

Shots Fired! Police Officer Has Great Response To 911 Call On Kids Playing Basketball
Shots Fired! Police Officer Has Great Response To 911 Call On Kids Playing Basketball

Snyder's emails reveal state officials' skepticism of lead fears and slow response in Flint crisis
... The emails, though redacted in some places and not generally containing content that is not already public information, do detail how the response ...

BET Has the Best Response to Stacey Dash: 'Can We Get Our Check Back?'
After the 'Clueless' actress said people should 'get rid of' BET, the network called the actress out in the funniest way possible.

Oscars 2016: Spike Lee commends Academy president for diversity response - EW.com
In the days since Spike Lee’s Instagram essay about skipping this year’s Academy Awards ceremony became the rallying cry for what some people ...

'She is a rockstar': Bollywood applauds Sunny Leone's zen-like responses to Bhupendra Chaubey - Firstpost ...
One is unclear what the purpose of Chaubey's interview with Sunny Leone was.

Academy's 'Hateful-ly Late' Comms Response
To boycott or not to boycott? That’s the question for many African American artists in Hollywood today. Not a good one for anyone in the Academy ...

DC'S FLAKY RESPONSE Why can't capital handle even an inch of snow?
DC'S FLAKY RESPONSE Why can't capital handle even an inch of snow?

Resources last updated: 1/22/2016 10:16:53 PM