In this tutorial, I will show you how to transmit JSON Object. I will also use the jTemplate with jQuery within ASP.NETMVC.
Let's create ASP.NET MVC Web Application in Visual Studio 2010, open your Visual Studio 2010 ,From Menu select New-> Project. New project window will be open. Select Web from Templates and select ASP.NET MVC2 Web Application and give name as i have given name MvcDropDownListjTemplate as shown in below Figure 1.1
Figure 1.1

Jquery library is avaible when you create a web Application in Visual Studio 2010, so jQuery Libarary is given in my ASP.NET MVC Web Application as shown in Figure 1.2
Figure 1.2

I have added jTemplate.js and jQuery-1.4.1.js javascript files in Master page as shown in Figure 1.3
you can download jTemplate plugin and examples from here
Figure 1.3

Now let's create Model Class named Country which will return Country ID, Country Name and Country Code as shown in Figure 1.4
Figure 1.1

Figure 1.6 shows that Models Country class is created.
Figure 1.6

JSON(Countries) will return List of Countries in the JSON format as shown in Figure 1.7. To view this List of JSON Object, you can use Firebug
Figure 1.7

Add jQuery following script under the HEAD section, success function will return the List of Countires from server side to client side as shown in below Figure 1.8
Figure 1.8

Now pass JSON data to jTemplate API to merge the JSON Data to jTemplate on cient side to display on screen as shown in Figure 1.9
Figure 1.9

Following figure shows the output.

Download
password
aamirhasan
Demo
See live demo