.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Linq to XML & ASP.Net - part 3

Posted By: nikolaosk     Posted Date: September 21, 2010    Points: 0   Category :ASP.Net
 
This is the third post in a new series of posts regarding LINQ to XML and ASP.Net.Please do read the first post here . You can find the second article here . The xml file we are going to use in all these posts is the students.xml file. You can find the contents of this xml file in the first post. I will use Visual Studio 2010 Ultimate edition and C# as the development language. Visual Studio 2010/2008 express editions will suffice. In this third post I will look at how to "Read an element with a...(read more)


View Complete Post


More Related Resource Links

Advanced Basics: The LINQ Enumerable Class, Part 2

  

This month Ken digs deeper into the System.Linq.Enumerable class and shows readers how to perform some magic data operations using System.Linq.Enumerable.

Ken Getz

MSDN Magazine September 2008


Advanced Basics: The LINQ Enumerable Class, Part 1.

  

Presented here is the LINQ Enumerable class, which allows you to manipulate data in any class that implements IEnumerable(Of T).

Ken Getz

MSDN Magazine July 2008


Dynamic LINQ Part 2 (Evolution)

  

A while ago, Scott Gu blogged about a Dynamic LINQ library that was part of the C# samples in VS2008. This library let developers put together late bound LINQ queries using a special syntax. This really comes in handy when you want to build a LINQ query based on dynamic input. Consider the following example:

public ActionResult List(string sort) {
    var northwind = new NorthwindEntities();
    IQueryable<Product> products = northwind.Products;
    switch (sort) {
        case "ProductName":
            products = products.OrderBy(p => p.ProductName);
            br

Quick Note: Accessing Data in a SharePoint 2010 Web Part by using LINQ

  
In this exercise, you develop and deploy a visual Web Part that reads data from two lists by using a LINQ query and displays it in a DataGrid control.

Linq to XML & ASP.Net - part 6

  
This is the sixth post in a new series of posts regarding LINQ to XML and ASP.Net.Please do read the first post here . You can find the second post here . You can find the third post here . You can read the fourth post here . You can find the fifth post here . In this post I would like to show on how to create a xml document on the fly and save it on a file in our local disk . I will use Visual Studio 2010 Ultimate edition and C# as the development language. Visual Studio 2010/2008 express editions...(read more)

Linq to XML & ASP.Net - part 5

  
This is the fifth post in a new series of posts regarding LINQ to XML and ASP.Net.Please do read the first post here . You can find the second post here . You can find the third post here . You can read the fourth post here . The xml file we are going to use in all these posts is the students.xml file. You can find the contents of this xml file in the first post. I will use Visual Studio 2010 Ultimate edition and C# as the development language. Visual Studio 2010/2008 express editions will suffice...(read more)

Linq to XML & ASP.Net - part 4

  
This is the fourth post in a new series of posts regarding LINQ to XML and ASP.Net.Please do read the first post here . You can find the second post here . You can find the third post here . The xml file we are going to use in all these posts is the students.xml file. You can find the contents of this xml file in the first post. I will use Visual Studio 2010 Ultimate edition and C# as the development language. Visual Studio 2010/2008 express editions will suffice. In this fourth post I will look...(read more)

Linq to XML & ASP.Net - part 2

  
This is the second post in a new series of posts regarding LINQ to XML and ASP.Net.Please do read the first article here . The xml file we are going to use in all these posts is the students.xml file. You can find the contents of this xml file in the link above. I will use Visual Studio 2010 Ultimate edition and C# as the development language. Visual Studio 2010/2008 express editions will suffice. In this second post I will look at how to "Read an element inside another element in an XML document...(read more)

WPF: If Heineken did MVVM Frameworks Part 4

  
MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

Playing with Linq grouping: GroupByMany?

  
One of its features is grouping. Many people understand grouping like it is defined in Sql. Linq is implementing grouping quite the same way. Let's discover this syntax and how to make consecutive groups easier.

LINQ : Implementing IN and NOT IN

  
I got tried of typing

var result = from s in source
where items.Contains(s)
select s;and so I implemented the IN and NOT IN methods as extension methods:

101 LINQ Samples Tutorials

  
101 LINQ Example with sample code snippets....This sample prints each element of an input integer array whose value is less than 5. The sample uses a query expression to create a new sequence of integers and then iterates over each element in the sequence, printing its value

Linq: how to share parameters between lambda expressions ?

  
When using Linq to objects, you will quickly feel the need to pass some parameters from a method to another but it's not so easy because each Linq method is not calling the following one. In a Linq sequence, each method is using the result computed by the previous one. So, local contexts are not visible from one method to another.
The compiler is using two technical different ways to let parameters go out of a method.

Linq to Sql CompiledQuery container

  
Ok now let's go. Here is just a little trick but with some interesting patterns that could be useful in some other contexts not connected to Linq to Sql.

When using Linq expressions, like with Linq to Sql, translating the expression into something else (sql for example) is taking time and resources. Sometimes it's negligible, sometimes not...

LINQ to SQL Paging using GridView in C# and ASP.NET 3.5

  
This tutorial will show you how we can extend the LINQ to SQL Class and create methods that will allow us to page data from a SQL database. C# version.

Building Layered Web Applications with Microsoft ASP.NET 2.0 - Part 1

  
"Building Layered Web Applications" that shows you how to build N-Layer applications with Microsoft ASP.NET 2.0. These articles teach you how to design, build and use custom business objects in your web application. The target audience for this series are developers that are ready to make the switch from using SqlDataSource controls to ObjectDataSource controls with custom business objects. Experience with ASP.NET 2 and C# is necessary while some knowledge about object oriented design certainly helps. The design I am going to show you in these articles is a simplified version of a design you would use in a real world application. It doesn't feature all the necessary functionality your application needs, but instead focuses on the underlying concepts.

Hello World to C# Threading Part 1

  
In this post we will see how we can implement simple threading. Why do we need threading? When you want you application to do more then one thing at same time, then you need to implement threading. One usual and common scenario would be when your application needs to get data from some other resource like web services and you don't want you application GUI to be freeze during this time. In that sort of case you will run the code to access web services in separate thread so your application GUI won't freeze. The System.Threading namespace .NET provide interfaces to implement multi threading.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend