vb.net“未声明名称”题 [英] vb.net "Name is not declared" question
问题描述
我是vb.net编程的新手,我不断收到此错误:名称
''GetQuery''未声明。我不明白为什么?似乎我有正确的引用/名称空间。
。这是我的代码。另外,有人可以向我解释ContentHandlerImpl.vb文件实际上做了什么吗?这是我正在使用的项目这个项目......但是我不确定文件究竟是什么
的确如此。谢谢!!
进口System.Xml
进口Lucene.Net.Documents
进口Lucene.Net.Analysis >
进口Lucene.Net.Index
进口Lucene.Net.Search
进口Lucene.Net.QueryParsers
进口Lucene.Net.Util
进口系统
进口System.IO
公共类SampleSearch2
继承System.Web.UI.Page
#Region" Web窗体设计器生成的代码
''Web窗体设计器需要此调用。
< System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
受保护的事件txtGender As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtConsent As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtIMBDystResult As
System.Web.UI.HtmlControls.HtmlSelect
受保护的事件txtIMFDystResult为
System.Web.UI.HtmlControls.HtmlSelect
受保护的事件txtIMBDystDiag为
System.Web .UI.HtmlControls.HtmlSelect
受保护的事件txtIMFDystDiag为
System.Web.UI.HtmlControls.HtmlSelect
受保护的事件txtIMFMerosinResult As
System.Web.UI.HtmlControls.HtmlSelect
受保护的事件SearchButton As System.Web.UI.WebControls.Button
受保护的事件lblText As System.Web .UI.WebControls.Label
受保护的事件lblResults As System.Web.UI.WebControls.Label
受保护的机智hEvents txtFetus As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents SearchButton1 As System.Web.UI.WebControls.Button
Protected WithEvents txtDescription As System.Web.UI .WebControls.TextBox
受保护的事件txtIMBDysferlin为
System.Web.UI.HtmlControls.HtmlSelect
受保护的事件txtIMFAlpha As System.Web.UI .HtmlControls.HtmlSelect
受保护的事件txtIMFMerosin As
System.Web.UI.HtmlControls.HtmlSelect
受保护的事件txtAgeFrom As System.Web.UI .WebControls.TextBox
Protected WithEvents txtAgeTo As System.Web.UI.WebControls.TextBox
Protected WithEvents txtDateTo As System.Web.UI.WebControls.TextBox
Protected WithEvents txtDateFrom As System.Web.UI.WebControls.TextBox
Protected WithEvents txtAsymp As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtFamilyHistory As
System.Web.UI.HtmlControls.Htm l选择
''注意:Web表格需要以下占位符声明
Designer。
''不要删除或者移动它。
私人designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object,ByVal e As
System.EventArgs)处理MyBase.Init
''CODEGEN:Web表单设计器需要此方法调用
''不要使用代码编辑器修改它。
InitializeComponent()
结束子
#End Region
私人strXmlFilePath As String = Server.MapPath(" / xmlsearch / xmlfiles /")
私有strIndexFilePath As String =
Server.MapPath(" / xmlsearch / xmlindex / ")
私人搜索者作为IndexSearcher =新的IndexSearcher(strIndexFilePath)
私有分析器作为Standard.StandardAnalyzer =新的
Standard.StandardAnalyzer
Priv吃Sub Page_Load(ByVal sender As System.Object,ByVal e As
System.EventArgs)处理MyBase.Load
''放置用户代码来初始化页面
End Sub
Private Sub SearchButton1_Click(ByVal sender As System.Object,ByVal e
As System.EventArgs)处理SearchButton1.Click
Dim strGender As String
Dim strConsent As String
Dim strFetus As String
Dim strAgeFrom As String
Dim strAgeTo As String
Dim strAge As String
Dim strDateFrom As String
Dim strDateTo As String
Dim strDate As String
Dim strAsymp As String
Dim strFamilyHistory As String
''IMF for Immuno-flourescence
Dim strIMFDystResult As String
Dim strIMFDystDiag As String
Dim strIMFMerosin As String
Dim strIMFAlpha As String
' 'IMB for Immunoblot
Dim strIMBDystResult As String
Dim strIMBDystDiag As String
Dim strIMBDysferlin As String
Dim strDesc As String
Dim searcher As IndexSearcher = New IndexSearcher( strIndexFilePath)
Dim analyzer As Standard.StandardAnalyzer = New
Standard.StandardAnalyzer
Dim hits as Hits
''从每次点击开始,我们需要清理结果
lblText.Text =""
lblResults.Text =""
strAge =""
strDate =""
strGender = txtGender.Value.ToUpper
strConsent = txtConsent.Value.ToUpper
strFetus = txtFetus.Value.ToUpper
strAgeFrom = txtAgeFrom.Text
strAgeTo = txtAgeTo。文字
strDateFrom = txtDateFrom.Text
strDateTo = txtDateTo.Text
strAsymp = txtAsymp.Value.ToUpper
strFamilyHistory = txtFamilyHistory.Value.ToUpper
strIMFDystResult = txtIMFDystResult.Valu e.ToUpper
strIMFDystDiag = txtIMFDystDiag.Value.ToUpper
strIMFMerosin = txtIMFMerosin.Value.ToUpper
strIMFAlpha = txtIMFAlpha.Value.ToUpper
strIMBDystResult = txtIMBDystResult.Value.ToUpper
strIMBDystDiag = txtIMBDystDiag.Value.ToUpper
strIMBDysferlin = txtIMBDysferlin.Value.ToUpper
>
strAgeFrom.Trim()
如果strAgeFrom.Length = 1那么
strAgeFrom =" 00" &安培; strAgeFrom
ElseIf strAgeFrom.Length = 2然后
strAgeFrom =" 0" &安培; strAgeFrom
ElseIf strAgeFrom.Length = 0然后
strAgeFrom =" 000" ''最小年龄
结束如果
strAgeTo.Trim()
如果strAgeTo.Length = 1那么
strAgeTo =" 00" &安培; strAgeTo
ElseIf strAgeTo.Length = 2然后
strAgeTo =" 0" &安培; strAgeTo
ElseIf strAgeTo.Length = 0然后
strAgeTo =" 120" ''最大年龄
结束如果
''我们将使用通配符strDesc
strDesc = txtDescription.Text
Dim strWords()As String = strDesc.Split("")
''根据输入构造查询
如果strGender.Length > 0然后
strGender =" + GENDER:" &安培; strGender
结束如果
如果strConsent.Length> 0然后
strConsent =" + IS_CONSENT_FORM:" &安培; strConsent
结束如果
如果strFetus.Length> 0然后
strFetus =" + IS_FETUS:" &安培; strFetus
结束如果
''这里的逻辑是strAgeFrom和strAgeTo的长度是
大于0 >
''但是如果strAgeFrom =" 000"和strAgeTo =" 120"这意味着用户输入的不是
如果strAgeFrom.Equals(" 000")和strAgeTo.Equals(" 120")那么
Else
strAge =" + AGE_YEAR:[" + strAgeFrom +"到 + strAgeTo +"]" &
strAge
结束如果
''必须包含DateFrom和DateTo才能搜索。使用AND而不是
或
如果strDateFrom.Length> 0和strDateTo.Length> 0然后
strDate =" + BIOPSY_DATE:[" + strDateFrom +"到 + strDateTo +
"]" &安培; strDate
结束如果
如果strFamilyHistory.Length> 0然后
strFamilyHistory =" + FAMILY_HISTORY:" &安培; strFamilyHistory
结束如果
如果strIMBDystResult.Length> 0然后
strIMBDystResult =" + DYST_RESULT:" &安培; strimBDystResult
结束如果
如果strIMBDystDiag.Length> 0然后
strIMBDystDiag =" + DYST_DIAGNOSIS:" &安培; strimBDystDiag
结束如果
如果strIMBDysferlin.Length> 0然后
strIMBDysferlin =" + DYSFERLINE_RESULT:" &安培; strimBDysferlin
结束如果
如果strIMFDystResult.Length> 0然后
strIMFDystResult =" + DYST_RESULT_FLO:" &安培; strimFDystResult
结束如果
如果strIMFDystDiag.Length> 0然后
strIMFDystDiag =" + DYST_DIAGNOSIS_FLO:" &安培; strimFDystDiag
结束如果
如果strIMFMerosin.Length> 0然后
strIMFMerosin =" + MEROSIN_RESULT_FLO:" &安培; strIMFMerosin
结束如果
如果strIMFAlpha.Length> 0然后
strIMFAlpha =" + ALPHA_SAC_RESULT_FLO:" &安培; strIMFAlpha
结束如果
如果strDesc.Length> 0然后
''描述字段是外卡searc
''首先清理strDesc
strDesc =""
Dim i As Integer
For i = 0 to strWords.Length - 1
Dim strWord As String = strWords(i)
strWord.Trim()
如果strWord.Length> 0然后
''追加*&
strWord = strWord +" *"
结束如果
strDesc + =" +" + strWord +"
下一页
strDesc =" + OTHER :(" + strDesc +")"
Else
''清理strDesc
strDesc =""
结束如果
''连接查询
Dim strQuery As String =""
如果strGender.Length> 0然后
strQuery + = strGender +"
结束如果
如果strFetus.Length> 0然后
strQuery + = strFetus +"
结束如果
如果strAge.Length> 0然后
strQuery + = strAge +"
结束如果
如果strDate.Length> 0然后
strQuery + = strDate +"
结束如果
如果strConsent.Length> 0然后
strQuery + = strConsent +"
结束如果
如果strFamilyHistory.Length> 0然后
strQuery + = strFamilyHistory +"
结束如果
如果strIMBDystResult.Length> 0然后
strQuery + = strIMBDystResult +"
结束如果
如果strIMBDystDiag.Length> 0然后
strQuery + = strIMBDystDiag +"
结束如果
如果strIMBDysferlin.Length> 0然后
strQuery + = strIMBDysferlin +"
结束如果
如果strIMFDystResult.Length> 0然后
strQuery + = strIMFDystResult +"
结束如果
如果strIMFDystDiag.Length> 0然后
strQuery + = strIMFDystDiag +"
结束如果
如果strIMFMerosin.Length> 0然后
strQuery + = strIMFMerosin +"
结束如果
如果strIMFAlpha.Length> 0然后
strQuery + = strIMFAlpha +"
结束如果
如果strDesc.Length> 0然后
strQuery + = strDesc
结束如果
Dim query1 As Query = GetQuery(strQuery,analyzer)
''搜索
尝试
hits = searcher.Search(query1)
Catch myerr As SystemException
lblText.Text ="没有符合您搜索条件的文件。"
退出Sub
最后
>
lblText.Text =" Found" &安培; hits.Length()& "
匹配查询< br>的记录
''" Gender:< b>" &安培; txtGender.Value& "< / B><峰; br> " &安培; _
''" Fetal muscle:< b>" &安培; txtFetus.Value&
"< / b>< br> " &安培; _
''"同意书:< b>" &安培; txtConsent.Value&
"< / b>< br> " &安培; _
''"免疫印迹肌营养不良蛋白结果:< b>" &
txtIMBDystResult.Value& "< / B><峰; br> " &安培; _
''" Immunoblot dystrophin diagnosis:< b>" &
txtIMBDystDiag.Value& "< / B><峰; br> " &安培; _
''"免疫荧光肌营养不良蛋白结果:< b>" &
txtIMFDystResult.Value& "< / B><峰; br> " &安培; _
''"免疫荧光肌营养不良症诊断:< b>" &
txtIMFDystDiag.Value& "< / B><峰; br> " &安培; _
''"评论< b>" &安培; txtDescription.Text& "< / b>< br>"
Dim i As Integer = 0
For i = 0 to hits.Length - 1
Dim doc As Document = hits.Doc(i)
lblResults.Text& ="< li> PROCEDURE ID:" &
doc.Get(" PROCEDURE_ID")。TrimEnd& _
"主题ID: &安培; doc.Get(" SUBJECT_ID")。TrimEnd& _
" < a href =''searchsubject.aspx?subject_ID =" &
doc.Get(" SUBJECT_ID")。Trim& _
"''target =''_ blank''>选择此记录< / a>< / li>"
''"< a href =''target.aspx?target = view& subject_ID =" &
doc.Get(" SUBJECT_ID")。Trim& _
''"& proc =" &安培; doc.Get(PROCEDURE_ID)。修剪& _
''"& biopsy =" &安培; doc.Get(BIOPSY_ID)。修剪& _
''"& age =" &安培; doc.Get(AGE_YEAR)。修剪& _
''"& physician =" &安培; doc.Get(PHYSICIAN_ID)。修剪& _
''"& fetus =" &安培; doc.Get(IS_FETUS)。修剪& _
下一页
lblResults.Text& ="< / ul>"
结束尝试
End Sub
结束班
Hi,
I''m new to vb.net programming, and I keep getting this error: Name
''GetQuery'' is not declared. I can''t figure out why?? It seems like I have
the right references/namespaces. This is my code below. Also, can someone
explain to me what the ContentHandlerImpl.vb file actually does? It''s in
this project that I''m working with...but I''m not sure what the file actually
does. Thanks!!
Imports System.Xml
Imports Lucene.Net.Documents
Imports Lucene.Net.Analysis
Imports Lucene.Net.Index
Imports Lucene.Net.Search
Imports Lucene.Net.QueryParsers
Imports Lucene.Net.Util
Imports System
Imports System.IO
Public Class SampleSearch2
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
''This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Protected WithEvents txtGender As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtConsent As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtIMBDystResult As
System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtIMFDystResult As
System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtIMBDystDiag As
System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtIMFDystDiag As
System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtIMFMerosinResult As
System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents SearchButton As System.Web.UI.WebControls.Button
Protected WithEvents lblText As System.Web.UI.WebControls.Label
Protected WithEvents lblResults As System.Web.UI.WebControls.Label
Protected WithEvents txtFetus As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents SearchButton1 As System.Web.UI.WebControls.Button
Protected WithEvents txtDescription As System.Web.UI.WebControls.TextBox
Protected WithEvents txtIMBDysferlin As
System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtIMFAlpha As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtIMFMerosin As
System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtAgeFrom As System.Web.UI.WebControls.TextBox
Protected WithEvents txtAgeTo As System.Web.UI.WebControls.TextBox
Protected WithEvents txtDateTo As System.Web.UI.WebControls.TextBox
Protected WithEvents txtDateFrom As System.Web.UI.WebControls.TextBox
Protected WithEvents txtAsymp As System.Web.UI.HtmlControls.HtmlSelect
Protected WithEvents txtFamilyHistory As
System.Web.UI.HtmlControls.HtmlSelect
''NOTE: The following placeholder declaration is required by the Web Form
Designer.
''Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
''CODEGEN: This method call is required by the Web Form Designer
''Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private strXmlFilePath As String = Server.MapPath("/xmlsearch/xmlfiles/")
Private strIndexFilePath As String =
Server.MapPath("/xmlsearch/xmlindex/")
Private searcher As IndexSearcher = New IndexSearcher(strIndexFilePath)
Private analyzer As Standard.StandardAnalyzer = New
Standard.StandardAnalyzer
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
''Put user code to initialize the page here
End Sub
Private Sub SearchButton1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles SearchButton1.Click
Dim strGender As String
Dim strConsent As String
Dim strFetus As String
Dim strAgeFrom As String
Dim strAgeTo As String
Dim strAge As String
Dim strDateFrom As String
Dim strDateTo As String
Dim strDate As String
Dim strAsymp As String
Dim strFamilyHistory As String
''IMF for Immuno-flourescence
Dim strIMFDystResult As String
Dim strIMFDystDiag As String
Dim strIMFMerosin As String
Dim strIMFAlpha As String
''IMB for Immunoblot
Dim strIMBDystResult As String
Dim strIMBDystDiag As String
Dim strIMBDysferlin As String
Dim strDesc As String
Dim searcher As IndexSearcher = New IndexSearcher(strIndexFilePath)
Dim analyzer As Standard.StandardAnalyzer = New
Standard.StandardAnalyzer
Dim hits As Hits
''start with every click, we need to clean the result
lblText.Text = ""
lblResults.Text = ""
strAge = ""
strDate = ""
strGender = txtGender.Value.ToUpper
strConsent = txtConsent.Value.ToUpper
strFetus = txtFetus.Value.ToUpper
strAgeFrom = txtAgeFrom.Text
strAgeTo = txtAgeTo.Text
strDateFrom = txtDateFrom.Text
strDateTo = txtDateTo.Text
strAsymp = txtAsymp.Value.ToUpper
strFamilyHistory = txtFamilyHistory.Value.ToUpper
strIMFDystResult = txtIMFDystResult.Value.ToUpper
strIMFDystDiag = txtIMFDystDiag.Value.ToUpper
strIMFMerosin = txtIMFMerosin.Value.ToUpper
strIMFAlpha = txtIMFAlpha.Value.ToUpper
strIMBDystResult = txtIMBDystResult.Value.ToUpper
strIMBDystDiag = txtIMBDystDiag.Value.ToUpper
strIMBDysferlin = txtIMBDysferlin.Value.ToUpper
strAgeFrom.Trim()
If strAgeFrom.Length = 1 Then
strAgeFrom = "00" & strAgeFrom
ElseIf strAgeFrom.Length = 2 Then
strAgeFrom = "0" & strAgeFrom
ElseIf strAgeFrom.Length = 0 Then
strAgeFrom = "000" ''minimun age
End If
strAgeTo.Trim()
If strAgeTo.Length = 1 Then
strAgeTo = "00" & strAgeTo
ElseIf strAgeTo.Length = 2 Then
strAgeTo = "0" & strAgeTo
ElseIf strAgeTo.Length = 0 Then
strAgeTo = "120" ''maximun age
End If
''we will use wildcard for strDesc
strDesc = txtDescription.Text
Dim strWords() As String = strDesc.Split(" ")
''Construct the query based upon the input
If strGender.Length > 0 Then
strGender = "+GENDER:" & strGender
End If
If strConsent.Length > 0 Then
strConsent = "+IS_CONSENT_FORM:" & strConsent
End If
If strFetus.Length > 0 Then
strFetus = "+IS_FETUS:" & strFetus
End If
'' the logic here is both length of strAgeFrom and strAgeTo are
greather than 0
'' but if strAgeFrom = "000" and strAgeTo = "120" that means neither
one is entered by users
If strAgeFrom.Equals("000") And strAgeTo.Equals("120") Then
Else
strAge = "+AGE_YEAR:[" + strAgeFrom + " TO " + strAgeTo + "]" &
strAge
End If
''must contain both DateFrom and DateTo to search. Use AND instead of
OR
If strDateFrom.Length > 0 And strDateTo.Length > 0 Then
strDate = "+BIOPSY_DATE:[" + strDateFrom + " TO " + strDateTo +
"]" & strDate
End If
If strFamilyHistory.Length > 0 Then
strFamilyHistory = "+FAMILY_HISTORY:" & strFamilyHistory
End If
If strIMBDystResult.Length > 0 Then
strIMBDystResult = "+DYST_RESULT:" & strIMBDystResult
End If
If strIMBDystDiag.Length > 0 Then
strIMBDystDiag = "+DYST_DIAGNOSIS:" & strIMBDystDiag
End If
If strIMBDysferlin.Length > 0 Then
strIMBDysferlin = "+DYSFERLINE_RESULT:" & strIMBDysferlin
End If
If strIMFDystResult.Length > 0 Then
strIMFDystResult = "+DYST_RESULT_FLO:" & strIMFDystResult
End If
If strIMFDystDiag.Length > 0 Then
strIMFDystDiag = "+DYST_DIAGNOSIS_FLO:" & strIMFDystDiag
End If
If strIMFMerosin.Length > 0 Then
strIMFMerosin = "+MEROSIN_RESULT_FLO:" & strIMFMerosin
End If
If strIMFAlpha.Length > 0 Then
strIMFAlpha = "+ALPHA_SAC_RESULT_FLO:" & strIMFAlpha
End If
If strDesc.Length > 0 Then
''the description field is wild card searc
''clean up the strDesc first
strDesc = ""
Dim i As Integer
For i = 0 To strWords.Length - 1
Dim strWord As String = strWords(i)
strWord.Trim()
If strWord.Length > 0 Then
''append the "*"
strWord = strWord + "*"
End If
strDesc += "+" + strWord + " "
Next
strDesc = "+OTHER:(" + strDesc + ")"
Else
''clean up the strDesc
strDesc = ""
End If
''concatenate the query
Dim strQuery As String = ""
If strGender.Length > 0 Then
strQuery += strGender + " "
End If
If strFetus.Length > 0 Then
strQuery += strFetus + " "
End If
If strAge.Length > 0 Then
strQuery += strAge + " "
End If
If strDate.Length > 0 Then
strQuery += strDate + " "
End If
If strConsent.Length > 0 Then
strQuery += strConsent + " "
End If
If strFamilyHistory.Length > 0 Then
strQuery += strFamilyHistory + " "
End If
If strIMBDystResult.Length > 0 Then
strQuery += strIMBDystResult + " "
End If
If strIMBDystDiag.Length > 0 Then
strQuery += strIMBDystDiag + " "
End If
If strIMBDysferlin.Length > 0 Then
strQuery += strIMBDysferlin + " "
End If
If strIMFDystResult.Length > 0 Then
strQuery += strIMFDystResult + " "
End If
If strIMFDystDiag.Length > 0 Then
strQuery += strIMFDystDiag + " "
End If
If strIMFMerosin.Length > 0 Then
strQuery += strIMFMerosin + " "
End If
If strIMFAlpha.Length > 0 Then
strQuery += strIMFAlpha + " "
End If
If strDesc.Length > 0 Then
strQuery += strDesc
End If
Dim query1 As Query = GetQuery(strQuery, analyzer)
''Search
Try
hits = searcher.Search(query1)
Catch myerr As SystemException
lblText.Text = "There are no documents that match your search."
Exit Sub
Finally
lblText.Text = "Found " & hits.Length() & " record(s) that
matched query<br> "
'' "Gender: <b>" & txtGender.Value & "</b><br> " & _
'' "Fetal muscle: <b>" & txtFetus.Value &
"</b><br> " & _
'' "Consent form: <b>" & txtConsent.Value &
"</b><br> " & _
'' "Immunoblot dystrophin result: <b>" &
txtIMBDystResult.Value & "</b><br> " & _
'' "Immunoblot dystrophin diagnosis: <b>" &
txtIMBDystDiag.Value & "</b><br> " & _
'' "Immuno-flourescence dystrophin result:<b>" &
txtIMFDystResult.Value & "</b><br> " & _
'' "Immuno-flourescence dystrophin diagnosis:<b>" &
txtIMFDystDiag.Value & "</b><br> " & _
'' "Comments<b>" & txtDescription.Text & "</b><br>"
Dim i As Integer = 0
For i = 0 To hits.Length - 1
Dim doc As Document = hits.Doc(i)
lblResults.Text &= "<li>PROCEDURE ID: " &
doc.Get("PROCEDURE_ID").TrimEnd & _
" SUBJECT ID: " & doc.Get("SUBJECT_ID").TrimEnd & _
" <a href=''searchsubject.aspx?subject_ID=" &
doc.Get("SUBJECT_ID").Trim & _
"'' target=''_blank''>Choose this record</a></li>"
'' "<a href=''target.aspx?target=view&subject_ID=" &
doc.Get("SUBJECT_ID").Trim & _
''"&proc=" & doc.Get("PROCEDURE_ID").Trim & _
''"&biopsy=" & doc.Get("BIOPSY_ID").Trim & _
''"&age=" & doc.Get("AGE_YEAR").Trim & _
''"&physician=" & doc.Get("PHYSICIAN_ID").Trim & _
''"&fetus=" & doc.Get("IS_FETUS").Trim & _
Next
lblResults.Text &= "</ul>"
End Try
End Sub
End Class
推荐答案
ST< ST @ discussions.microsoft.com>写道:
ST <ST@discussions.microsoft.com> wrote:
我是vb.net编程的新手,我不断收到此错误:名称
''GetQuery''未声明。我不明白为什么?好像我有正确的引用/命名空间。这是我的代码。另外,有人可以向我解释ContentHandlerImpl.vb文件实际上做了什么吗?我正在和这个项目合作......但是我不确定文件实际上是什么。谢谢!!
I''m new to vb.net programming, and I keep getting this error: Name
''GetQuery'' is not declared. I can''t figure out why?? It seems like I have
the right references/namespaces. This is my code below. Also, can someone
explain to me what the ContentHandlerImpl.vb file actually does? It''s in
this project that I''m working with...but I''m not sure what the file actually
does. Thanks!!
嗯,你打算打电话给GetQuery什么?你已经展示了尝试给b
打电话,但没有声明它。
-
Jon Skeet - < sk *** @ pobox.com>
http:// www。 pobox.com/~skeet
如果回复小组,请不要给我发邮件
Well, what GetQuery are you trying to call? You''ve shown the attempt to
call it, but no declaration for it.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
你的意思究竟是什么意思?对不起,这是别人做过的代码,而且他们告诉我只需将它添加到我们现有的项目中。
" Jon Skeet [ C#MVP]"写道:
What do you mean exactly? Sorry, this is code that somebody else did, and
they told me to just add it into an existing project we have.
"Jon Skeet [C# MVP]" wrote:
ST< ST@discussions.microsoft.com>写道:
ST <ST@discussions.microsoft.com> wrote:
我是vb.net编程的新手,我不断收到此错误:名称
''GetQuery''未声明。我不明白为什么?好像我有正确的引用/命名空间。这是我的代码。另外,有人可以向我解释ContentHandlerImpl.vb文件实际上做了什么吗?我正在和这个项目合作......但是我不确定文件实际上是什么。谢谢!
I''m new to vb.net programming, and I keep getting this error: Name
''GetQuery'' is not declared. I can''t figure out why?? It seems like I have
the right references/namespaces. This is my code below. Also, can someone
explain to me what the ContentHandlerImpl.vb file actually does? It''s in
this project that I''m working with...but I''m not sure what the file actually
does. Thanks!!
那么,你想要调用什么GetQuery?你已经展示了试图给它打电话,但没有声明它。
-
Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet
Well, what GetQuery are you trying to call? You''ve shown the attempt to
call it, but no declaration for it.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
ST< ST@discussions.microsoft.com>写道:
ST <ST@discussions.microsoft.com> wrote:
你的意思是什么?对不起,这是其他人做的代码,并且他们告诉我只是将它添加到我们现有的项目中。
What do you mean exactly? Sorry, this is code that somebody else did, and
they told me to just add it into an existing project we have.
然后你需要问它们也适用于GetQuery方法 - 然后
从头开始学习VB.NET,而不是从现有代码开始学习VB.NET。我知道它很苛刻,但是从第一原则学习更有可能获得一个良好的语言基础(和框架)。
-
Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet
如果回复小组,请执行不要给我发邮件
Then you need to ask them for the GetQuery method as well - and then
start learning VB.NET from scratch, rather than from existing code. I
know it''s harsh, but learning from first principles is much more likely
to get you a good firm foundation in the language (and the framework).
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
这篇关于vb.net“未声明名称”题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!