In ASP.NET C#, I want to show an ALERT('HI') from codebehind of a UserControl but doesn't work:
User Control:
<asp:UpdatePanel ID="updatepanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click();"/>
</ContentTemplate>
</asp:UpdatePanel>
ASP.NET Page
protected void btnSubmit_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "s1", "javascript:alert('hi!')", true);
}
UPDATE:
Forgot to say that the ASP.NET page itself is pop-out window by "prettyPhoto".