Here I am going to explain how you can run the Linq with ASP.NET in vs2005. You have to download the Linq CTP package to make the vs2005 to work with the Linq.
After Installing the Linq,Create a new project, choose Linq ASP.NET application. In the form_load I am going to load the names which is having the length more than 10 characters.
protected void Page_Load(object sender, EventArgs e) { string[] Names ={ "Arulmozhi","Arulanandhasamy","Sivakumar", "Baaluanandh","Cheliyan","Cholabarathi", "Damodaran","Elavarman","Fouzia Anwar"}; gvcity.DataSource = from name in Names where name.Length > 10 orderby name select name.ToUpper(); gvcity.DataBind(); 'The result will get assigned in the gridview }
Regards, Dharma
|
No responses found. Be the first to respond and make money from revenue sharing program.
|