jQuery! It is really amazing.
It is a simplified version of JavaScript and has made the web developer's life easy. By using jQuery it is possible to build high speed web applications easily.
ASP.NET MVC includes jQuery. It is the perfect match to build high speed web applications. By using jQuery plungins you can build very robust web applications.
It is worth learning and implementing jQuery.
Please visit: www.jquery.com
Sunday, February 28, 2010
Thursday, February 25, 2010
Create XML by using LINQ
Is it possible to create an XML from a single statement? Yes, it is possible through LINQ. I think this is the easiest way to create an XML string. Is there any other method much easier than this?
Here is the code.
var xml = new XElement("Products",
new XElement("Product",
new XElement("ProductId", "1001"),
new XElement("ProductDesc","Product1"),
new XElement("UOM", "20")));
Here is the output.
<Products>
<Product>
<ProductId>1001</ProductId>
<ProductDesc>Product1</ProductDesc>
<UOM>20</UOM>
</Product>
</Products>
Here is the code.
var xml = new XElement("Products",
new XElement("Product",
new XElement("ProductId", "1001"),
new XElement("ProductDesc","Product1"),
new XElement("UOM", "20")));
Here is the output.
<Products>
<Product>
<ProductId>1001</ProductId>
<ProductDesc>Product1</ProductDesc>
<UOM>20</UOM>
</Product>
</Products>
Labels:
LINQ XML