What is wrong with ScriptManager.RegisterStartupScript?
<p>ScriptManager.RegisterStartupScript(this, this.GetType(), "redirectScript", "window.location.href='Thankyou.aspx?'Service=" + hidService.Value  + ";",true);</p>

<p>Getting error: Expected ;</p>

<p>Please help me</p>
