asp.net - Auto Suggested Text Box with concatenated string with LINQ to SQL -


I'm creating a text box I've suggested, so it works well, it only suggests the first name , But I want to suggest it the full name (first and last name which tells two different columns). Take a look at the following code behind expected work:

  & lt; System.Web.Services.WebMethod () & gt; _ Public Shared Function GetNames (ByVal prefixText as string, counting as ByVal integer) String () DD as new dimotattext () Dimension db.Students.Where (function) function (n) n. FirstName). Select (function (n) n.FirstName). (Counting) .Ore end function  

Here's the mark-up:

   

I wrote the following code to get the text box to be a full name, but it does not work:

  dim query = (from S in D.B.Standt _ where s.FirstName.StartsWith (prefixText) _Server s.FirstName_ Select {new name = s.FirstName & amp; "" & L.ListName} ") with new one. Take it (count) .Oere return query  

When I create this project, it says that the value of type '1-dimensional array (line 50)' string 'Can not be converted to a 1-dimensional array' because 'line 50' is not derived from 'string')

Annoboy suggests, please comment. Thanks.

Do not create a new anonymous object with a name attribute that is a string Return, just return the string:

  slow query = (s from DB.Stendent_s_ where s.firstname. Start (prefix text) _server s.firstname_. Firstname & amp; "" & amp; s.lastname). (Calculation) .oor  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -