I want to load huge amount of base64 string that was bind into image and audio control in kendo grid. But the data cannot load in grid, i try for over 24 rows , that's ok. For over 30 rows , it might not sure to load in grid. How do I solved this problem? Anyone Help !!! I also compress that base64 string , it'not work properly. I want to compress double size of original file size. The use of file types are jpeg, wav, pcm, 3gpp, and 3gp.
Here is my model,
public byte[] MULTIMEDIANOTEDATA { get; set; }
public string strMULTIMEDIANOTEDATA { get; set; }
public string MULTIMEDIANOTEDATA64
{
get
{
return MULTIMEDIANOTEDATA != null ? Convert.ToBase64String(MULTIMEDIANOTEDATA) : null;
}
}
Here is my controller,
public ActionResult GetNoteItems([DataSourceRequest] DataSourceRequest request)
{
//get models
List<NotesModel> Notes = new List<NotesModel>();
List<NotesModel> lstNotes = (new CitationFactory(Session[Constants.Security.AIConnectionStringSessionVariableName].ToString())).GetNotes();
foreach (var item in lstNotes)
{
Notes.Add(new NotesModel
{
NOTEDATE = item.NOTEDATE,
NOTESMEMO = item.NOTESMEMO,
MULTIMEDIANOTEDATATYPE = item.MULTIMEDIANOTEDATATYPE.ToString().Replace("\"", ""),
MULTIMEDIANOTEFILENAME = item.MULTIMEDIANOTEFILENAME,
MULTIMEDIANOTEDATA = item.MULTIMEDIANOTEDATA,
});
}
int total = 0;
if (Notes.Any())
total = Notes.Count();
var result = new DataSourceResult
{
Data = Notes,
Total = total
};
var jsonResult = Json(result, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}