472,807 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

response.redirect is not working but server.transfer is working

in my appplication if i try to go to next page using
response.redirect, it does not work and control remains on same page
but if i use server.transfer control goes to nex page??

can any one explain me why ?????

Jan 18 '06 #1
14 3900
Hi,
Can you post how you are using Response.Redirect ?
Patrick

"gaurav tyagi" <gt*****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
in my appplication if i try to go to next page using
response.redirect, it does not work and control remains on same page
but if i use server.transfer control goes to nex page??

can any one explain me why ?????

Jan 18 '06 #2
old way (Not
working)------------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
try
{

Response.Redirect( "ManagementMenu.aspx", false );
}
catch( Exception aExc)
{
string sErrMsg = "Failed to go to requested web page !\n\n" +
"Details:\n\n" +
aExc.Message;
GuiManipulator.DisplayErrorPage( this.Page, sErrMsg );
}
}

Next
way(notWorking)----------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
Response.Redirect( "ManagementMenu.aspx", false );

}
new
Way(Working)---------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
Server.Transfer("ManagementMenu.aspx");

}

Jan 18 '06 #3
i think you chould clear out the 2nd param :)
"gaurav tyagi" <gt*****@gmail.com> schreef in bericht
news:11**********************@g44g2000cwa.googlegr oups.com...
old way (Not
working)------------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
try
{

Response.Redirect( "ManagementMenu.aspx", false );
}
catch( Exception aExc)
{
string sErrMsg = "Failed to go to requested web page !\n\n" +
"Details:\n\n" +
aExc.Message;
GuiManipulator.DisplayErrorPage( this.Page, sErrMsg );
}
}

Next
way(notWorking)----------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
Response.Redirect( "ManagementMenu.aspx", false );

}
new
Way(Working)---------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
Server.Transfer("ManagementMenu.aspx");

}

Jan 18 '06 #4

Edwin Knoppert wrote:
i think you chould clear out the 2nd param :)
"gaurav tyagi" <gt*****@gmail.com> schreef in bericht
news:11**********************@g44g2000cwa.googlegr oups.com...
old way (Not
working)------------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
try
{

Response.Redirect( "ManagementMenu.aspx", false );
}
catch( Exception aExc)
{
string sErrMsg = "Failed to go to requested web page !\n\n" +
"Details:\n\n" +
aExc.Message;
GuiManipulator.DisplayErrorPage( this.Page, sErrMsg );
}
}

Next
way(notWorking)----------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
Response.Redirect( "ManagementMenu.aspx", false );

}
new
Way(Working)---------------------------------------------------------------------------------------------------

private void btnManagement_Click(object sender, System.EventArgs e)
{
Server.Transfer("ManagementMenu.aspx");

}




i have checked this one also
if i remove second argument , by default it takes true this means
response.redirect will stop the existing thread and go for new thread
but here it is not enable to open next page so a blank page comes.
so if i put false , framework do not close current thread and try to
open next page thread but here also it is not able to open next page
so current page remains there


Jan 18 '06 #5
NOT WORKING------------------------------
private void btnManagement_Click(object sender,
System.EventArgs e)
{
Response.Redirect( "ManagementMenu.aspx);
}

Jan 18 '06 #6
On 18 Jan 2006 04:06:53 -0800, "gaurav tyagi" <gt*****@gmail.com>
wrote:
NOT WORKING------------------------------
private void btnManagement_Click(object sender,
System.EventArgs e)
{
Response.Redirect( "ManagementMenu.aspx);
}


When you do a response.redirect like this, the server should send a
302 HTTP response with a location header that tells the browser where
to go. The browser will then do an HTTP GET for that location. A
Netmon trace (or a trace using Ethereal) will give you an indication
as to what is breaking down.

Jim Cheshire
--
Blog:
http://blogs.msdn.com/jamesche
Jan 18 '06 #7
Tell me where is your Management.aspx page reside?

Jan 18 '06 #8
it is in same application Management.aspx resides.
both pages are in same application

Jan 19 '06 #9
Tell me the folder structure

Jan 19 '06 #10
in same folder both page resides

Jan 19 '06 #11

Remove the try catch block and let me know the result
thomson

Jan 19 '06 #12
there is no folder
this is a simple application which has no module , no folder

Jan 19 '06 #13

in the button click only response.redirect should be there no try catch
and let me know the result
thomson

Jan 19 '06 #14
there is no try catch

Jan 20 '06 #15

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

Similar topics

11
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a...
6
by: \A_Michigan_User\ | last post by:
Ok, I give up... why do 1-4 work fine... but 5-6 give "can't find" errors? 1. Client-side VBscript code: call navigate("\\209.11.22.33\MyDir") 2. Client-side VBscript code: location.href...
3
by: Justin | last post by:
Hi, Im confused here over the usage of Response.Redirect and Server.Transfer. I used frameset for my work, what are the proper usages of the two methods that seems working similar.. The...
5
by: Paul de Goede | last post by:
I set the Response.Filter in my aspnet application but I have noticed that if you do a Server.Transfer that the filter doesn't get called. And in actual fact the response is mostly empty. It seems...
4
by: Harsh Thakur | last post by:
Hi, I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a...
1
by: Sospeter | last post by:
Hi Ken, I have done that but still experiencing same problem. Tried the following i.e. turning smartnavigation = false and using server.transfer as below but nothing works. Please help. ...
3
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan...
2
by: Nathan Sokalski | last post by:
The last two lines of code in the Click event of a Button Control on my page are: Me.WelcomeEmail() Response.Redirect("mainmenu.aspx") The last line of code in Me.WelcomeEmail() is:
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.