try this
if (Session["CategCode"] != null)
{
Hiddenfield.Value=Session["CategCode"].ToString();
}
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myscript", "window.open('CategoryList.aspx','','width=530,height=450,toolbar=no,resizable=no,location=center,status=no');", true);
if(string.IsNullOrEmpty(HiddenField1.Value))
{
Session["CategCode"] = HiddenField1.Value;
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "A", "<script>window.opener.document.forms[0].submit();window.close();</script>");
}
else
{
ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('Please Select any Value')</script>");
return;
}