We need to show a dialog and stop execution of the C# code that follows the dialog until the dialog is closed. It needs to stop and wait just after the Page.Controls.Add line.
Bare in mind this is a Multi user application and using Thread.Sleep and code like this isn't an option.
The code is as follows...
Bare in mind this is a Multi user application and using Thread.Sleep and code like this isn't an option.
The code is as follows...
Code:
if (currentBookedPlaces > maxPlacesNew)
{
string jStr =
@"<script language='JavaScript'>
window.showModalDialog('Test.aspx',null,
'dialogWidth=200px;dialogHeight=100px');
</script>";
LiteralControl lictl = new LiteralControl(jStr);
Page.Controls.Add(lictl);
//Need the code to holt execution here until the above
//dialog has been closed.
}
// Code continues here...