none
How to passing an array from Controller to View? MVC.

    Question

  • Hello, hope you all are good, Am kind of a new developer to .NET and currently doing one of my student project over .NET 4 (MVC-3), the problem i have been facing is:

     

    I’ve an Array of string which contains few information of product such as names, description etc.

    Now i want to pass this array to view and retrieve these details on the view page..

     

    Viewbag["proinfo"]=proinfo; // proinfo is the array.

     

     

    And retrieve it in the view page as:

      

    var proinfo =ViewBag["proinfo "];

    But that’s not happening.. So can some one of you please guide me to the right way of passing an array from controller to view?

    Thank you

    Saturday, July 30, 2011 12:46 PM

Answers

  • oh I M sorry, i thought as it involves C# so i can ask it here, bt thanks for the rite forum suggestions, ill ask it there. Thankyou
    Sunday, July 31, 2011 9:47 AM

All replies