Click here to Skip to main content
15,896,421 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
for example here i am applying this code in class file
here as you see that i am applying function EmailData(email) after calling response.redirect
But this criteria is not working
so please any 1 can tell me, how i am able to call my function i.e EmailData(email) after response.redirect();


SaveClientResponse(clientresponse, subuserid);
HttpContext.Current.Response.Redirect("https://www.google.co.in");
EmailData(email);
Posted
Updated 11-Jul-14 2:36am
v3

1 solution

Hi,

Use following :
Add 'false' in Response.Redirect as shown below.

SaveClientResponse(clientresponse, subuserid);
HttpContext.Current.Response.Redirect("https://www.google.co.in", false);
EmailData(email);
 
Share this answer
 
Comments
Ayush1857 11-Jul-14 9:15am    
i have already try this approach but in this case HttpContext.Current.Response.Redirect("https://www.google.co.in", false);
is not executing and over pass response.redirect.

what is really want to do that is that it will redirect to another page and also call the function at same time as a background process

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900