MVC C# calling a stored procedure and creating a datatable RRS feed

  • Question

  • Hi,

    I want to call a stored procedure in and display values in a table.

    I created a model for ado connection and have access to all my stored procedures, I can populate a dropdown ok but not sure how to populate a table.

    My code for dropdown:

    DBEntites db = new DBEntites();
            public ActionResult Index( )
    	   CircuitClass  model  = new CircuitClass();
    	   model.MyCircuit = 
    	   return View( model );
      public class CircuitClass
         public IEnumerable<getMyCircuits_Result> MyCircuit
        Circuit: @Html.DropDownListFor(x => x.MyCircuit, new SelectList(Model.MyCircuit, "Name", "Name"), "Select Circuit")

    How do I make a table for my other stored procedures?

    Thanks for your help.


    • Edited by CuriousCoder15 Wednesday, April 17, 2019 2:34 PM
    • Moved by CoolDadTx Wednesday, April 17, 2019 2:35 PM ASP.NET related
    Wednesday, April 17, 2019 2:27 PM

All replies

  • Please post questions related to MVC in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, April 17, 2019 2:35 PM
  • Apologies.


    Wednesday, April 17, 2019 2:46 PM