Setting the Modal Dialog Box's Height and Width

  • Thread starter Thread starter Gibs
  • Start date Start date
G

Gibs

Hey

I tried to set the Image Button attributes dynamically like this. When the
user click on the image button, that image has to show in a modal dialog
box. I was able to do that with out any probs. But i am not able to set the
height and width of the modal dialog box. This is the code i have tried.

string strScript =
"showModalDialog(\"\\ImageView.aspx?ImgId="+row["ImageID"].ToString()
+"\""+",\"\",\"dialogHeight:250,dialogWidth:500\")" ;

imgBtn.Attributes.Add("OnClick",strScript);

is anything i am missing?

Thanks in Advance
 
Yes It is working for me now. I found my mistake.

I gave a , [comma] instead of ';' this to separate the dialogHeight and dialogWidth

this is working for me
showModalDialog(\"\\ImageView.aspx?ImgId="+row["ImageID"].ToString()
+"\""+",\"\",\"dialogHeight:250;dialogWidth:500\")" ;


Now it is working.

Thanks
 
Back
Top