You can use the following line to solve your problem. But make sure
ScriptManager
exists in your master/content page.
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "RedirectPage();", true);
For further information please click
here