Geeks With Blogs

News kaleidoscope 1817, lit. "observer of beautiful forms," coined by its inventor, Sir David Brewster (1781-1868), from Gk. kalos "beautiful" + eidos "shape" (see -oid) + -scope, on model of telescope, etc. Figurative meaning "constantly changing pattern" is first attested 1819 in Lord Byron, whose publisher had sent him one.

Kaleidoscope Everything under the sun, ending in .Net

Please find how we call JavaScript Object Notation in cloud applications.

As we all know how client script is useful in web applications in terms of performance.

          Same we can use JQuery in Asp.net using Cloud  computing which will  asynchronously pull any messages out of the table(cloud storage)  and display them in the     browser by invoking a method on a controller that returns JavaScript Object Notation (JSON) in a well-known shape.

Syntax :

Suppose we want to write a  JQuery function which return some notification while end user interact with our application so use following syntax :

public JsonResult GetMessages()
{
     if (User.Identity.IsAuthenticated)
     {
    UserTextNotification[] userToasts = 
         toastRepository.GetNotifications(User.Identity.Name);
         object[] data =
         (from UserTextNotification toast in userToasts
         select new { title = toast.Title ?? "Notification",
         text = toast.MessageText }).ToArray();
          return Json(data, JsonRequestBehavior.AllowGet);
     }
        else
           return Json(null);
}

Above function is used to check authentication and display message if user is not exists in Table.

Plateform :   ASP.NET 3.5  MVC 1   Under Visual Studio 2008  .

Please find below link for more detail :

http://msdn.microsoft.com/en-us/magazine/ee335721.aspx

 

Chandraprakash

Technorati Tags:
Posted on Sunday, March 21, 2010 5:35 PM | Back to top


Comments on this post: JSON Support in Azure

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © kaleidoscope | Powered by: GeeksWithBlogs.net