Setting the Modal Dialog Box's Height and Width

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
 
G

Gibs

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top