C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » ADO.NET »

Linq in ASP.NET


Posted Date: 18 Oct 2008    Resource Type: Code Snippets    Category: ADO.NET
Author: DharmarajMember Level: Diamond    
Rating: 1 out of 5Points: 7



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



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
LINQ in ASP.NET  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Connecting MySQL with C#
Previous Resource: Shuffling Data Values : Make it simple with using newid()
Return to Discussion Resource Index
Post New Resource
Category: ADO.NET


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use