我收到此错误'重载解析失败,因为没有可访问的'DataBind'对于这些参数最具体“下面是我正在使用的代码。
Private Overloads Sub DataBind(ByVal iPageIndex As Integer)
//do some thing
End Sub
Protected Overridable Sub DataBind(raiseondatabinding as Boolean)
//Do some thibg
End Sub
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSearch.Click
DataBind(Nothing) //this is where I am getting error
End Sub
任何帮助都会被挪用。
谢谢,
与Pradeep
答案 0 :(得分:2)
它不知道您尝试使用的DataBind
版本,因为Nothing
可转换为Boolean
和Integer
。您可以使用变量:
Private Sub btnSearch_Click(ByVal sender As Object, _
ByVal e As ImageClickEventArgs) _
Handles btnSearch.Click
Dim x As Integer = Nothing
DataBind(x)
End Sub
或只指定0
或False
作为参数:
Private Sub btnSearch_Click(ByVal sender As Object, _
ByVal e As ImageClickEventArgs) _
Handles btnSearch.Click
DataBind(False)
End Sub
根据实际想要呼叫的版本进行调整。像编译器一样,我无法分辨你的意图:)