< Script Language = Javascript >
Function Opendialogwin ()
{
VaR Result = Window. showmodaldialog ( " Showmessage. aspx " , "" , " Dialogheight: 160px; dialogwidth: 300px; Status: No; help: No; scroll: No " );
// Window. show ('showmessage. aspx ', '', 'height = 300, width = 400, Top = 250, Left = 250, toolbar = No, menubar = No, scrollbars = No, resizable = No, location = No, status = no', '_ blank ');
If (Result = " Yes " )
Window. Alert ( " You clicked yes! " );
Else If (Result = " No " )
Window. Alert ( " You clicked no! " );
// Document. writeln (result );
}
</ Script > < Input type = Button Value = " Button " Name = " BTN " Onclick = " Opendialogwin () " />
Response. Write ( " <Script language = 'javascript '> " );
Response. Write ( " Function confirm () {window. returnvalue = 'yes'; window. Close ();} " );
Response. Write ( " Function cancel () {window. returnvalue = 'no'; window. Close ();} " );
Response. Write ( " </SCRIPT> " );
Response. Write ( " <Div align = 'center'> <input type = 'button 'value = 'yes' onclick = 'Confirm () '/> <input type = 'button' value = 'no' onclick = 'cancel () '/> </div> " );