Sharad
Sharad

Reputation: 743

Response.Redirect cannot be called in a Page callback

I am getting this error. I am using ICallbackEventHandler to fill the some dropdowns. On a particular condition I want to redirect to a certain aspc page but I am getting

Response.Redirect cannot be called in a Page callback.

I have also used Server.Transfer but problem did not solve.

Upvotes: 1

Views: 3844

Answers (1)

shenhengbin
shenhengbin

Reputation: 4294

Response.Redirect() implicate call the Response.End() which would absolutely stop the page-lifecycle execution.

So you cannt use it in your callback method. You can use a client method instead it like window.location.href = "...."

Upvotes: 1

Related Questions