可以去掉System.window.forms的引用,要messagebox.show的时候稍微有点麻烦,如下所示:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim aa As System.Windows.Forms.MessageBox
Dim bb As System.Windows.Forms.MessageBoxButtons = OKCancel
Dim cc As System.Windows.Forms.MessageBoxIcon = Warning
Dim MsgResult As System.Windows.Forms.DialogResult = System.Windows.Forms.DialogResult.OK
If (MsgResult = aa.Show("要連接到深圳熱線馬?", "Warning!", bb, cc, System.Windows.Forms.MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly)) Then
Response.Redirect("http://www.szonline.net")
End If
End Sub