tag:blogger.com,1999:blog-8980734269859237005.post7015288793619731000..comments2024-01-30T01:03:21.768-08:00Comments on DevCurry: Deserialize JSON string and bind to ASP.NET DropDownListSuprotim Agarwalhttp://www.blogger.com/profile/08349831623922214390noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-8980734269859237005.post-42982255216836369042011-03-07T10:47:30.409-08:002011-03-07T10:47:30.409-08:00Please can you provide an example how I can deseri...Please can you provide an example how I can deserialize this -<br /><br />{<br />"root": {<br /> "labels": [<br /> { "Text": "my text value" }<br /> ]<br />}<br />}<br /><br />How the ListItems class will look like?<br />Thanks!Saxenahttps://www.blogger.com/profile/10289933271117833515noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-18779299682548871982010-09-23T23:32:29.701-07:002010-09-23T23:32:29.701-07:00A really useful info on the utility class "Se...A really useful info on the utility class "Serializer". Thanks buddyThanigainathannoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-52725943065160675652010-09-21T11:28:03.400-07:002010-09-21T11:28:03.400-07:00@Darin Yankowsky
Yes, that is what I am saying!! ...@Darin Yankowsky<br /><br />Yes, that is what I am saying!! The DropDownList should be populated on the client side.azamsharphttps://www.blogger.com/profile/15810450696387201756noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-47253312994784132062010-09-21T08:52:30.760-07:002010-09-21T08:52:30.760-07:00azamharp you are right about one thing but wrong a...azamharp you are right about one thing but wrong about other. as you say, the author should checked the isPostBack, however I disagree when you raise point of populating dropdown on server side. It is normal to return objects from server side to the client side domain and instead of using xml, author use json. <br /><br />One example could be when you pass a zipcode and get coordinate location. IDarin Yankowskynoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-13240477170258341852010-09-21T08:18:23.508-07:002010-09-21T08:18:23.508-07:00A lot of problems in your code! Let's begin wi...A lot of problems in your code! Let's begin with the Page_Load. Your code should be inside the if(!Page.IsPostback) condition so it is not populated every time the page is refreshed. <br /><br />Second, I do not see the point of populating the DropDownList on the server side. If you are converting it to JSON why are you populating it on the server side. Why not deserialize the JSON on the azamsharphttps://www.blogger.com/profile/15810450696387201756noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-2053931320152216992010-09-21T01:57:10.275-07:002010-09-21T01:57:10.275-07:00Very nice!
I wrote blog posts regarding JavaScript...Very nice!<br />I wrote blog posts regarding JavaScriptSerializer - with examples: http://weblogs.asp.net/hajan/archive/2010/07/23/javascriptserializer-dictionary-to-json-serialization-and-deserialization.aspx<br /><br />Check it, you may like it ;)hajanhttp://weblogs.asp.net/hajannoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-61300933971789376042010-09-08T09:33:44.430-07:002010-09-08T09:33:44.430-07:00I never knew .net had a class to do this! wow and ...I never knew .net had a class to do this! wow and thanks for this.Dave Pittnoreply@blogger.com