Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8876495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:13:40+00:00 2026-06-14T19:13:40+00:00

I’m trying to proccess a jSON request, the url used in getJSON is http://localhost:52563/Documentos/Docs/CondicionesMostrar?NumIdTransaccion=16091&NumIdConcepto=421.

  • 0

I’m trying to proccess a jSON request, the url used in getJSON is

http://localhost:52563/Documentos/Docs/CondicionesMostrar?NumIdTransaccion=16091&NumIdConcepto=421. 

The text returned by my partialview using this:

string ljListaItems = Json.Encode(loListaItems).ToString();
@ljListaItems

it return this data

    [{"MedidasRelativas":false,"CssClass":"ParadigmaNTouchItem","CssClassAlterna":"ParadigmaNTouchItemAlterno","CssClassImage":"","CssClassTitle":"","CssClassFlag":"","ajaxRegion":"DetalleCondiciones","ajaxAction":"onclick=\"/Documentos/Docs/CondicionesAgregar?NumIdtransaccion=16090&IntIdCondicion=1&status=False\"","ajaxActionIzq":"","ajaxEnabled":true,"ajaxMethod":0,"ajaxMode":0,"ajaxRegionLoading":"#trabajando","ajaxData":"","image":"","editarCantidad":false,"cantidad":0,"useCssAlterno":false,"id":"I_Cond_1","title":"sin pulpo","flag":null,"width":0,"height":0,"top":0,"left":0},{"MedidasRelativas":false,"CssClass":"ParadigmaNTouchItem","CssClassAlterna":"ParadigmaNTouchItemAlterno","CssClassImage":"","CssClassTitle":"","CssClassFlag":"","ajaxRegion":"DetalleCondiciones","ajaxAction":"onclick=\"/Documentos/Docs/CondicionesAgregar?NumIdtransaccion=16090&IntIdCondicion=2&status=False\"","ajaxActionIzq":"","ajaxEnabled":true,"ajaxMethod":0,"ajaxMode":0,"ajaxRegionLoading":"#trabajando","ajaxData":"","image":"","editarCantidad":false,"cantidad":0,"useCssAlterno":false,"id":"I_Cond_2","title":"sin salami","flag":null,"width":0,"height":0,"top":0,"left":0}]

That is a representation of this class:

public class RootObject
{
 public bool MedidasRelativas { get; set; }
 public string CssClass { get; set; }
 public string CssClassAlterna { get; set; }
 public string CssClassImage { get; set; }
 public string CssClassTitle { get; set; }
 public string CssClassFlag { get; set; }
 public string ajaxRegion { get; set; }
 public string ajaxAction { get; set; }
 public string ajaxActionIzq { get; set; }
 public bool ajaxEnabled { get; set; }
 public int ajaxMethod { get; set; }
 public int ajaxMode { get; set; }
 public string ajaxRegionLoading { get; set; }
 public string ajaxData { get; set; }
 public string image { get; set; }
 public bool editarCantidad { get; set; }
 public int cantidad { get; set; }
 public bool useCssAlterno { get; set; }
 public string id { get; set; }
 public string title { get; set; }
 public object flag { get; set; }
 public int width { get; set; }
 public int height { get; set; }
 public int top { get; set; }
 public int left { get; set; }
}

Note: This class was generated at http://json2csharp.com/
My jquery code is this:

function actualizarCondiciones(tcLink) {
 $.getJSON(tcLink, function (condiciones) {
     alert(condiciones); //It never reach.
     $.each(condiciones, function (key, val) {
         alert(val);
     });
 });
}

The problem is that callback function never reach.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:13:41+00:00Added an answer on June 14, 2026 at 7:13 pm

    In chat you included this code:

    public ActionResult CondicionesMostrar(decimal NumIdTransaccion , decimal NumIdConcepto) 
    { 
        // Se verifica si la session de usuario ya tiene cargada una Id de Transaccion 
        VerificarTransaccion(NumIdTransaccion); 
    
        //Se seleccionan el item, este ya tiene relacionado el grupo y las condiciones del mismo 
        var item = from i in db.Merlin_ConceptosFacturacion 
        where i.NumIdConcepto == NumIdConcepto 
        select i ; 
    
        // Se verifica si ya se han agregado algunas condiciones 
        var condiciones = from c in db.Merlin_BR_Condiciones_x_Pedido 
        where c.NumIdTransaccion == NumIdTransaccion 
        select c; 
    
        ViewBag.condiciones = condiciones.ToList(); 
    
        return View(item.First()); 
    }
    

    But you should return a json type, as this:

    public JsonResult CondicionesMostrar(decimal NumIdTransaccion , decimal NumIdConcepto) 
    { 
        ...
        return Json(item.First()); 
    }
    

    To test this you can write the following code:

    public JsonResult CondicionesMostrar(int numIdTransaccion, int numIdConcepto) 
    { 
        return Json(new {NumIdTransaccion = numIdTransaccion, NumIdConcepto = numIdConcepto}); 
    }
    

    And in javascript:

    function actualizarCondiciones(tcLink) {
     $.getJSON(tcLink, function (condiciones) {
         console.log(condiciones); // depending on the browser you use, there might not "console.log"
         $.each(condiciones, function (key, val) {
             console.log(key, val);
         });
     }).fail(function() {
         console.log('error', arguments);
     });
    }
    

    UPDATE for request with GET method:

    public JsonResult CondicionesMostrar(int numIdTransaccion, int numIdConcepto) 
    { 
        return Json(
              new {NumIdTransaccion = numIdTransaccion, NumIdConcepto = numIdConcepto}
              ,JsonRequestBehavior.AllowGet
        ); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.