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

  1.  
  2. var objCars= new[]
  3. {
  4. new {CarID = 2, CarName = "Ford", Fuel = "Diesel"},
  5. new {CarID = 3, CarName = "Audi", Fuel = "Diesel"},
  6. new {CarID = 4, CarName = "Mercedes", Fuel = "Diesel"},
  7. new {CarID = 1, CarName = "BMW", Fuel = "Diesel"}
  8. };
  9.  
  10. XElement _cars = new XElement("cars",
  11. from c in objCars
  12. select new XElement("car",
  13. new XElement("name", c.CarName),
  14. new XAttribute("ID", c.CarID),
  15. new XElement("Fuel", c.Fuel)
  16. )
  17. );
  18. Console.WriteLine(_cars);
  19.  
  20.  

so this will print something like:

Ford
Diesel

Audi
Diesel

Mercedes
Diesel

BMW
Diesel