Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
197 Points
128 Posts
Oct 16, 2011 02:43 AM|LINK
Hi Guys,
Is there a way that i can make xml and json from this below scenario.
1. Getting all the information from the DB and store in the model.
2. Model AdminInfo cointain
public int adminID { get; set; } public string adminName { get; set; } public string adminPwd { get; set; }
3. I can calling this information by simple using and make an xml or json by creating stringbuilder.
AdminInfo model = new AdminInfo (); StringBuilder str = new StringBuilder(); str.Append("<adminName>" + model.adminName + "</adminName");
I Feel the above method is not so good. is there any way that can be convert to xml and json directly.
herman_tho
Member
197 Points
128 Posts
Producing XML AND JSON
Oct 16, 2011 02:43 AM|LINK
Hi Guys,
Is there a way that i can make xml and json from this below scenario.
1. Getting all the information from the DB and store in the model.
2. Model AdminInfo cointain
public int adminID { get; set; } public string adminName { get; set; } public string adminPwd { get; set; }3. I can calling this information by simple using and make an xml or json by creating stringbuilder.
AdminInfo model = new AdminInfo (); StringBuilder str = new StringBuilder(); str.Append("<adminName>" + model.adminName + "</adminName");I Feel the above method is not so good. is there any way that can be convert to xml and json directly.