Background objects go JSON string passed to the front desk, turn JSON string object bound label assignment

        ///  <Summary> 
        /// to create a replacement - Automatic data acquisition corresponding (rear end)
         ///  </ Summary> 
        [HttpGet]
         public ActionResult the GetProductInfo ( String materialNumber) 
        { 
            String MSG = String .Empty;
             var Model _exchangeOrderAppService.GetProductInfo = (materialNumber, OUT MSG); 
return the Content (JsonConvert.SerializeObject (Model)); // JSON array into the target sequence, and then transmitted through the front the Content }
       // automatically obtain products (the front end) 
        function GetProductInfo () {
                    $ .get ( "? / The RMA / ExchangeOrder / = the GetProductInfo materialNumber" + materialNumber,
                 function (RES) {   var Object = the JSON.parse (RES); // the JSON string transfer objects 
                        $ ( "#MaterialNumber" ) .val (object.MaterialNumber); 
                }); 
        }           

 

(Reference)

Distal turn Json json string objects: https://blog.csdn.net/qq_33172029/article/details/82903230

C # in the object serialization format json: https://blog.csdn.net/Upgrader/article/details/83659774

Guess you like

Origin www.cnblogs.com/wang-min/p/11527032.html