TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abhineet Srivastava
NA
890
94.5k
Templates is not binding
Sep 19 2013 6:35 AM
I am binding the json data with jquery templates likes this--
<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
<script src="/scripts/jquery.loadTemplate-1.2.2.js"></script>
<script type="text/javascript">
$(document).ready(function () {
PopulatePersons();
});
//Creating the ajax call, and if succeeded then display the result on UI
function PopulatePersons() {
$.ajax({
type: "GET",
url: "/Default.aspx/getEmp",
contentType: "application/json; charset=utf-8",
//data: "{}",
//dataType: "json",
success: AjaxSucceeded,
error: AjaxFailed
});
}
function AjaxSucceeded(result) {
alert("sucess");
$("#template").tmpl(result.d).appendTo("#placeholder");
}
function AjaxFailed(result) {
alert('no success');
}
</script>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<script type="text/html" id="template">
<div data-content="firstname"></div>
<div data-content="middlename"></div>
<div data-content="lastname"></div>
<div data-content="post"></div>
</script>
<ul id="placeholder"></ul>
</asp:Content>
But problem is data is not displaying?
Giving error tmpl is not found?
kindly help
Reply
Answers (
1
)
how to embed video in asp.net
oops