Posts

Showing posts from September, 2017

Featured Post

Smart Product designer

Image
download and purchase link: https://alkanyx.com/item/49/Smart+Product+designer

Live preview : http://smartproductdesigner.000webhostapp.com/

Smart Product Designer is a  tool to create your own product and get directly from your website. It is well documented, very easy to customize and use. It is build using most advance technologies including javascript, jQuery and html5.
Features Choose different product from collectionAdd custom texts to product.Change text colorChange the size and font of the TextLet the user drag, move or remove elementsAdd images to product selected from art gallery or browse it from systemDesign both frontside and back-sideShows preview while designingDownload designVery easy to customize and useHere is the purchase link : https://alkanyx.com/item/49/Smart+Product+designer

Load Json array using jQuery and javascript

Here is the script to load json array-


<head><title>Page Title</title><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script></head><body><divid="images">test</div></body>

var dictionary =[ {"id":"0","name":"ABC"}, {"id":"1","name":"DEF"} , {"id":"2","name":"PQR"}, {"id":"3","name":"xyz", "name2":"xyz2"} ]; $(function (){ for (var ke in dictionary ) { if (dictionary.hasOwnProperty(ke)) { var id = dictionary [ke].id; var name = dictionary [ke].name; //create a anchor element using id.//when user clicks on this id open data //related to this $('#images').append('<br/><div id="'+id+'&…

Convert class object to XML using C# in .NET

People is the class whose object needs to be converted in XML string which later can be stored in a DB field or as XML file.

publicclassPersonDetail { publicstring FirstName { get; set; } publicstring LastName { get; set; } } publicclassPeople { publicPeople() { PeopleList = new List<ProductImage>(); } public List<PersonDetail> PeopleList{ get; set; } }

Function to convert class object to XML string:

publicstaticstring SerializeToXml<T>(T value) { StringWriter writer = new StringWriter(CultureInfo.InvariantCulture); XmlSerializer serializer = new XmlSerializer(typeof(T)); serializer.Serialize(writer, value); return writer.ToString(); }
C# code to convert class object to XML string:

People peopleDetailList = new People(); PersonDetail pDetail = new PersonDetail (); pDetail.FirstName= "Vivek"; pDetail.LastNa…