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 ????? 14 3934
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 ?????
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 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");
}
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
NOT WORKING------------------------------
private void btnManagement_Click(object sender,
System.EventArgs e)
{
Response.Redirect( "ManagementMenu.aspx);
}
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
Tell me where is your Management.aspx page reside?
it is in same application Management.aspx resides.
both pages are in same application
Tell me the folder structure
in same folder both page resides
Remove the try catch block and let me know the result
thomson
there is no folder
this is a simple application which has no module , no folder
in the button click only response.redirect should be there no try catch
and let me know the result
thomson This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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.
...
|
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...
|
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:
|
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)....
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
|
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...
| |