ASP.NET Popup Windows
Show any Page as a modal popup window in ASP.NET.
AI
สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
ซอร์สโค้ด
Public Function BuildPopUpScript(ByVal Page As String, _
Optional ByVal dialogWidth As Int32 = 255, _
Optional ByVal dialogHeight As Int32 = 255, _
Optional ByVal modal As Boolean = True) As String
Try
Dim jsmodal As String
If modal Then
jsmodal &= "if (window.showModalDialog)"
jsmodal &= "{window.showModalDialog('" & Page.Trim & "','name',"
jsmodal &= "'dialogWidth:" & dialogWidth & "px;dialogHeight:" & dialogHeight & "px;status:no;help:no;scroll:no');}"
jsmodal &= "else{"
jsmodal &= "window.open('" & Page.Trim & "','name','height=" & dialogHeight & ","
jsmodal &= "width=" & dialogWidth & ",toolbar=no,directories=no,status=no,"
jsmodal &= "menubar=no,scrollbars=no,resizable=no,modal=yes');"
jsmodal &= "}"
Else
jsmodal &= "window.open('" & Page.Trim & "','name','height=" & dialogHeight & ","
jsmodal &= "width=" & dialogWidth & ",toolbar=no,directories=no,status=no,"
jsmodal &= "menubar=no,scrollbars=no,resizable=no,modal=no');"
End If
Return jsmodal
Catch ex As Exception
Return "alert(" & ex.Message & ");"
End Try
End Function
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine