Instead of
<body onload="showPopUp('dialog');"></body>
try registering the javascript function from codebehind of page.
protected void Page_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "showPopUp", "showPopUp('dialog');", true);
}
Let me know if it helps.