我很久以来一直在使用vb.net,但从未遇到过这个问题.由于某种原因,Intellisense没有检测到MsgBox().当我将鼠标悬停在突出显示的红线上时,它表示"'MsgBox'未被声明.由于其保护级别,它可能无法访问",并且在可能的修复中它尝试创建名为MsgBox()的新函数.以下是代码:
Imports System
Imports System.Data.SqlClient
Imports System.Runtime.InteropServices
Imports System.Web.Configuration
Imports Microsoft.Office.Interop.Outlook
Public Class ConferenceRooms
Inherits System.Web.UI.Page
Dim SQLConnection As New
SqlConnection(ConfigurationManager.ConnectionStrings("MyDB").ConnectionString)
Dim SQLcommand As New SqlCommand
Dim SQLAdapter As SqlDataAdapter
Dim SQLDataTable As DataTable
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'MsgBox(LBTest.Attributes("title"))
'Dim lb As Label = CType(Me.Controls("HR Conference Room"), Label)
If Not IsPostBack Then
Dim Query1 As String
Query1 = "Select Location_ID from LCSConference_Locations where vacant = 1"
RunQuery(Query1)
Dim OrganizerEmail As String = …Run Code Online (Sandbox Code Playgroud)