This way
HTML
<asp:ScriptManager ID = "ScriptManager1" runat = "server"></asp:ScriptManager>
<asp:UpdatePanel ID = "UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button Text="Show Message" runat="server" OnClick = "ShowMessage" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" AssociatedUpdatePanelID = "UpdatePanel1">
<ProgressTemplate>
<img alt = "" src="103.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
Code
protected void ShowMessage(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string message = "alert('Hello! Mudassar.')";
ScriptManager.RegisterClientScriptBlock((sender as Control), this.GetType(), "alert", message, true);
}