Click here to Skip to main content
12,076,925 members (44,677 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » Samples » Downloads

Stats

128.9K views
3.9K downloads
179 bookmarked
Posted

jQuery Templates/View Engines in ASP.NET MVC

, 26 Apr 2012 CPOL
This article explains how client-side view engines can be used in ASP.NET MVC.
LoadJSON.zip
LoadJSON
bin
LoadJSON.dll
Content
images
details_close.png
details_open.png
logo17.jpg
logo18.jpg
logo19.jpg
logo20.jpg
logo21.jpg
stripe.png
title.gif
Controllers
Global.asax
LoadJSON.csproj.user
Models
obj
Debug
TempPE
Properties
Scripts
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Load Form with JSON data</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="/Content/style.css" />
	<script src="/scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
	<script src="/scripts/jquery.loadJSON.js")" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            var id = window.location.href.match("(ID=|id=|/)[0-9]+")[0].match("[0-9]+");
            $('form').loadJSON('/Company/Data/' + id);
        });
    </script>
</head>

<body>
<div id="page-wrap">
    <div id="contact-area">	
        <form name="form_simple" id="form-simple" action="details.html" method="get">
            <input type="hidden" id="ID" name="ID" />
			<label for="Name">Name</label>
			<input name="Name" id="Name" type="text" />
			<label for="Address">Address</label>
			<textarea name="Address" id="Address" rows="5" cols="20"></textarea>
			<label for="Country">Country</label>
			<select name="Country" multiple="multiple">
                <option value="">-</option>
				<option value="UK">United Kingdom</option>
                <option value="SRB">Serbia</option>
				<option value="USA">United States of America</option>
				<option value="FRA">France</option>  
			</select>
            <br /><br />
			<label for="IsFeatured">Is Featured</label>
			<input name="IsFeatured" id="IsFeatured" type="checkbox" value="true"/>
            <br /><br />
			<label for="Town">Town</label>
			<select name="Town" id="Town">
                <option value="" selected="selected">-</option>
				<option value="London">London City</option>
				<option value="Liverpool">Liverpool City</option>
				<option value="Lothian">Lothian City</option>
				<option value="Newcastle">Newcastle City</option>
                <option value="Buckinghamshire">Buckinghamshire City</option>
                <option value="Essex">Essex City</option>  
			</select>
            <br /><br />
			<label for="Contact">Contact</label>
				<input name="Contact" type="radio" value="Email"/> Email
				<input name="Contact" type="radio" value="Phone" /> Phone
				<input name="Contact" type="radio" value="Post" /> Post
            <input type="submit" value="Details" class="submit-button" />
	    </form>
    </div>
</div>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Jovan Popovic
Program Manager Microsoft
Serbia Serbia
Graduated from Faculty of Electrical Engineering, Department of Computer Techniques and Informatics, University of Belgrade, Serbia.
Currently working in Microsoft as Program Manager on SQL Server product.
Member of JQuery community - created few popular plugins (four popular JQuery DataTables add-ins and loadJSON template engine).
Interests: Web and databases, Software engineering process(estimation and standardization), mobile and business intelligence platforms.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160212.1 | Last Updated 26 Apr 2012
Article Copyright 2011 by Jovan Popovic
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid