private static void JsonResponse(object pObject)
{
try
{
HttpResponse response = HttpContext.Current.Response;
response.ContentType = "application/json";
response.Charset = "utf-8";
var utf8 = new UTF8Encoding();
String json = JsonConvert.SerializeObject(pObject);
Byte[] encoded = utf8.GetBytes(json);
response.BinaryWrite(encoded);
response.End();
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
Un poco de C#,JScript,VB, y CRM, Drupal, SQL , MSDCRM y MSDSL VBTools, developer, project lider, Social Media Activist, BlackBerry developer, telerik tools. (MCITP)
jueves, 17 de octubre de 2013
JSON Response C#
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario