Quantcast
Channel: How to make array values readable into C# MVC controller - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Dileep Sreepathi for How to make array values readable into C# MVC controller

$
0
0

On every button click you are adding the values in to an array: suppose all the array values are in the flIntinerary

 var postData = { values: flIntinerary}; 

Hence pass the postData through ajax

Then Your Model must be like

public TourPackage {
    public list<string> values {get; set;}
}

and Controller is like:

 public ActionResult AddPackage(TourPackage postData)
        {

            if (ModelState.IsValid)
            {

            }
            return View();
        }

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>