or
$(
'h1,h2,h2 a,h3,h5,h6:not(.fx-cufon)'
).livequery(
function
() {
$(
this
).addClass(
'fx-cufon'
);
Cufon.replace($(
this
), { fontFamily:
'Decker'
, hover:
true
});
});
public ActionResult GetProducts()
{
----------
return Json(Products, JsonRequestBehavior.AllowGet);
}
--Javascript to bind datasource
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: ('@Url.Action("GetProducts")'),
dataType: "jsonp"
}
},
pageSize: 12
});
// Model View
@model IEnumerable<Models.Product>
@{
ViewBag.Title = "Index";
}
public ActionResult GetImage()
{
var imgquery = (from img in dbContext.Personaldetails where img.ID == 1
select new
{
Image = img.Image
}).FirstOrDefault();
{
System.IO.MemoryStream outStream = new System.IO.MemoryStream();
byte[] Image = imgquery.Image;
return File(Image, "Image/jpg");
}
}
In the view,i retrieved by using <img src="@Url.Action("GetImage", "Home")" alt = "image" />
now, i want to display specific images with specific ID value.
...
dataSource : {
// JSONP is required for cross-domain AJAX
dataType : "jsonp",
transport : {
read : baseURL + "Data;jsessionid=" + jsessionId + "?browserid=" + browserId + "&type=2&tool=fooBar",
cache: false,
contentType: "application/json; charset=utf-8",
//
// add additional parameters here...
//
parameterMap : function(options, type) {
options.cafe_dataplugin = "dispo_ticket_list";
options.cafe_fields = ticketColumns;
return kendo.data.transports["odata"].parameterMap(options, type);
}
},
...