You have to go to design view of your webform, where you placed your textbox.
Make sure you added the autocomplete extender to the textbox
Then click on that little symbol in the upper right hand corner of the textbox
and add the page method.
With the new page method loaded, copy the function code into the page method.
Make sure you copy the first 2 lines as well, because this completes the function so that it works.
<system.web.services.webmethodattribute(),>
Public Shared Function GetCompletionList(ByVal prefixText As String, ByVal count As Integer, ByVal contextKey As String) As String()
' Create array of movies
Dim movies() As String = {"Star Wars", "Star Trek", "Superman", "Memento", "Shrek", "Shrek II"}
' Return matching movies
Return (
From m In movies
Where m.StartsWith(prefixText,StringComparison.CurrentCultureIgnoreCase)
Select m).Take(count).ToArray()
End Function
You should be able to press [F5] and it will work.