Saturday, May 23, 2009

Creating a pop-up in ASP.NET

Add the below code to any button so that we it is clicked, it will open a Modal dialog and note that in back window we cannot do anything

btn.Attributes.Add("onclick",
"window.showModalDialog('BaseWork.aspx','BaseWork',
'dialogWidth:400px;dialogHeight:300px;');");