i heard we should use “return” after “Response”.why?
like this :
Response.Redirect("../Login.aspx");
return;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That’s probably just an artifact of C# development. Every C# method requires a
returnstatement, regardless of what happens in theResponse.Redirectcall.You’re probably assuming that the
returnwon’t execute, but that’s not the case.Response.Redirect, once called, does in fact pass control back to the next statement in the C# method, just like any other method call would.