c# - Non-Model Driven Return page in MVC -


On the site I am creating my first MVC website, I need to create a page that will allow a user to access my model database Allows you to select from the stored object, enter some extra data (text field), and then click on a button and calculate it after returning the result table. These results will not be stored in the database. In addition, this table of data can change into the number of columns etc. which changes depending on the object.

What is the best way to do this with MVC? This is not a standard CRUD operation and all MVC tutorials are in my research only really covering the CRUD operation.

ASP.NET MVC pages can be typed in any class (including net class) or It can not be typed at all, this is not a big deal.

Your operation (on the controller):

Datatable object (from system.data)

> [HTTP Post] Public ActionResult DoMath (Information in its Aggregations) {System.Data.DataTableTablesTabularResults = New System.Data.DataTable (); // See your magic return (your tabular results); }

and your view:

  @ Model system. Data DataTable @ {layout = null; } & Lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; DoMath & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div & gt; @work (System.Data. Detroau Current Lines Model.Rose) {// Make Your Work} & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

Regards

Comments