Nisi’s work blog

Nisi’s work blog – programing tips

LiveUI open source framework for .NET websites

It is possible? In the web development open source is similar with PHP & MySQL and a tone of free CMS based on them. Now it is possible with .NET too. How?

LiveUI is the answer and is built for .NET 3.5 sp1

  • Based on pure ASP .NET
  • Pluggable to any asp.net application
  • jQuery and ExtJS support
  • Composite approach
  • 100% testable application code

To download LiveUI and documentation: http://liveui.net/

LINQ to XML (C#) create new xml document

How to create a new xml with LINQ

[sourcecode language='csharp ']

var objCars= new[]
{
new {CarID = 2, CarName = “Ford”, Fuel = “Diesel”},
new {CarID = 3, CarName = “Audi”, Fuel = “Diesel”},
new {CarID = 4, CarName = “Mercedes”, Fuel = “Diesel”},
new {CarID = 1, CarName = “BMW”, Fuel = “Diesel”}
};

XElement _cars = new XElement(“cars”,
from c in objCars
select new XElement(“car”,
new XElement(“name”, c.CarName),
new XAttribute(“ID”, c.CarID),
new XElement(“Fuel”, c.Fuel)
)
);
Console.WriteLine(_cars);

[/sourcecode]
so this will print something like:

Ford
Diesel

Audi
Diesel

Mercedes
Diesel

BMW
Diesel