I am getting this error ‘overload resolution failed because no accessible ‘DataBind’ is most specific for these arguments’ below is the code I am using.
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
Any help would be appropriated.
Thanks,
Pradeep
It doesn’t know which version of
DataBindyou’re trying to use, becauseNothingis convertible to bothBooleanandInteger. You could either use a variable for this:or just specify
0orFalseas the argument:Adjust depending on which version you actually wanted to call. Like the compiler, I can’t tell what you intended 🙂