Hm, I don't know the ansver on YOUR question, but it seems that you know the ansver on MY question that I 've send in yesterday:
I know how to open a modal window, clicking on a button after I wrote (in Page_Load)
Button1.Attributes.Add("OnClick", "ShowDialog();");
//JAVAscript
But I can't...