Interviews5 answers
What is difference between Response.Redirect("abc.aspx",true) and Response.Redirect("abc.aspx",false)
5 Answers
True words, equivalent Exit Sub / function is called after the Redirect Redirect statement is no longer perform;
False, still executed after the Redirect statement.
Arjun DhilodPosted Sep 16, 2015, 2:27 AM EDT
refer my article
http://www.c-sharpcorner.com/UploadFile/0c1bb2/response-redirect-true-and-response-redirect-false-in-asp-ne/
Vithal WadjePosted Dec 31, 2014, 11:20 PM EST
if i use Response.Redirect("abc.aspx",false) then code written after Response.Redirect("abc.aspx",false) will be executed then page is redirected ,if i use Response.Redirect("abc.aspx",true) then code written after the Response.Redirect("abc.aspx",true) will not be executed
Vithal WadjePosted Nov 3, 2014, 6:58 AM EST
Response.Redirect()-->cause the browser to connect with specified URL.
Use Response.Redirect() in following cases:-
1->U want to connect to a resource on any server.
2->U want to connect to a non aspx resource.
3->U want to pass querystring as part of the URL.
server.Transfer()-->transfer the execution from the current Aspx file to specified Aspx file. The specified Aspx file must be on the same server. when U want to transfer the control to an Aspx page residing on the same server we should use Server.Transfer() because server.Transfer() avoid unnecessary round trip. The default use of server.Transfer() method does not pass the form data and the query string of the original page request to the transferred page.But, you can preserve the form data and query string of the original page by passing a True value to the optional second argument, PreserveForm, of the Server.Transfer() method.
Mahanti ChiranjeeviPosted Jun 1, 2014, 11:03 PM EDT
When we use false as second parameter in Response.Redirect then code written after Response.Redirect will be executed.
And when we use true then there will be no further execution of code as it kill the thread and throw an aThreadAbortException
Rashmi SainiPosted Jan 7, 2014, 1:10 AM EST


