last day (15 days later) » 

4:10 PM
Hi
 
hi zam
hablas español?
 
Hey
Can you post your entire code here
which you are using in local
 
claro
te lo comparto 1 minuto
en el archivo data esta la data que entrega el controlador, y el javascript es landing.js
te agradezco mucho tu ayuda zam
 
Let me check
 
claro muchas gracias
 
4:23 PM
Not having access to your drive
Please make the file sharable
or you can use upload feature in this chat
 
Yes can see now
 
are you getting console.log(response); ?
 
si
sale undefined
 
4:30 PM
Ok
when you make the ajax call, can see you see in the network activity if the call is to your controller is successfull
 
si
el copntrolador devuelve exitosamente lo que te copie en el archivo data
controlador
 
ok
the data has "" on both ends meaning its a string and not an object.
we need to parse it first
 
y eso que lo estoy serializando desde el aspx
 
success: function (response) {
const data = JSON.parse(response);
console.log(data);
$.each(data, function () {
console.log('Loop 1: ', this['idFotografia']);
});
},
Try the above snippet
 
este es mi controlador
en el drive comparti
el c# de controlador
 
4:39 PM
I dont understand spanish. Using google translate to find out what you are telling :)
 
OKAY. I say that in the folder I shared the c # controller that delivers the information
I tried the code I get this
Unexpected token o in JSON at position 1
 
any way to share screen?
 
anydesk?
 
can you put console.log('Type', typeof response) inside success handler
check what its output
 
si
what the controller returns is exactly what it copied into the data file
 
4:50 PM
i wanted to check its type. whether response is string or object
its its string we need to use the parse() else not required
 
si
devuelve una cadena
if it returns a string
public static string loadAsyncFotografiasTags()
{
try
{
NoticiaLandingNegocio obrNoticiaPortal = new NoticiaLandingNegocio();
List<ENFotografiaSearchTag> objNoticiaPortal = obrNoticiaPortal._LandingSearchFotografiabyTags("COVID19, PANDEMIA");
//Ruta COmpleta de Fotografia
//string RutaFotografia = Static.RutaFotografiaPathVirtual() + "thumbnail/" + Static.FechaEstructuraWeb(objNoticiaPortal.dtmFechaFotografia) + objNoticiaPortal.vchImgMediana;
//objNoticiaPortal.vchRutaCompletaFotografia = RutaFotografia;
 
I dont know c#. But from a first glance, the serializing is quite not correct i guess
coz once you do serialise json should not have back slashes
 
I am very grateful for your time.
 
Can you copy the response from the browser console?
Was reading a c# article. backslashes appear inside IDE. think you copied the data from there
 

last day (15 days later) »