using (DBUserDataContext db = new DBUserDataContext()) { str = @" select distinct ltrim(rtrim(UserID)) as userText, ltrim(rtrim(UserID)) as userValue from Users order by userID asc"; var result = db.ExecuteQuery<User>(strSQL); result.ToList(); }
DataTextField = "userText" DataValueField = "userValue"
public class User{ public datatype UserID{get;set;} }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)