i've created a sandboxed solution visual webpart and it has submit button so when user fills the information in the text boxes availble in webpart and clicks submit button so I want to open popup button containg success message and ok button so when user clicks ok button in popup window i want user to be redirected to the home page of the site.
i tried to open popup and showed success message by below code
string gotohomepage = "http://sp2013:1111/Pages/home.aspx";
ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Your Record has been submitted successfully,you will be redirected to home Page shortly');location.href = '" + gotohomepage + "';", true);
but it's not opening popup window can anyone help how do i open popup window and redirect user to home page in sandboxed solution