Sub QuickModalMessage(ByVal sMessage, ByVal sHeight, ByVal sWidth, ByVal sTitle)
'********************************************************************************************************************
'USAGE: QuickModalMessage("Wow this is cool",200,300,"Here's a title for ya")
'********************************************************************************************************************
'********************************************************************************************************************
'Of course will need these references in the <head> section..
'<script type="text/javascript" src="http://www.schimsky.com/jquery/jquery-3.4.1.min.js"></script>
'<script type="text/javascript" src="http://www.schimsky.com/jquery/jquery-ui-1.12.1.custom/jquery-ui.min.js"></script>
'<link type="text/css" rel="Stylesheet" href="http://www.schimsky.com/jquery/jquery-ui-1.12.1.custom/jquery-ui.min.css">
'********************************************************************************************************************
Dim sDialogName As String = "MyDialogMessage" 'Default value
'Create a div and add some properties...
Dim dv = New System.Web.UI.HtmlControls.HtmlGenericControl("DIV")
dv.InnerHtml = sMessage
dv.ID = sDialogName
dv.Attributes.Add("title", sTitle)
'*************************************
'Form1 is the page's main form...
'Add div to current form1...
form1.Controls.Add(dv)
'*************************************
'This will do the magic...
Dim s As String = ""
s = s & "<script> $('#" & sDialogName & "').dialog({ resizable: false, height: " & sHeight & ","
s = s & " width: " & sWidth & ", autoOpen: true, closeOnEscape: false,"
s = s & " show: 'slide', hide: 'slide', modal: true,"
s = s & " buttons: { Ok: function() { $(this).dialog('close'); } }"
s = s & "}).prev().find('.ui-dialog-titlebar-close').hide(); </script>"
ClientScript.RegisterStartupScript(Me.GetType, "javascript", s)
End Sub