c# - Editing and saving any datatable in mvc -


How can I do this after editing, deleting, adding tasks, and saving the file? I am worth evaluating and I am showing in showing the figures.

This is the data format derived from the other classes, which is different from the dataset every time

  [HttpGet] Public Activity LocalfilmHolderAction () {Datatable Model Model 2 = New Datatile Model () {DataTableForXml = DataTypeControl.dataTableFinaly}; See Return (Model 2); }   

And it shows my view code with foreach

  @model ValueMapping.WebUI.Models.DataTableModel shows the Data tab with System.Data ; Using @ System.Web.Helpers & lt; Div id = "ListView" & gt; & Lt; Table style = "font-family: vardana, arial, non-serif; font-size: 11px; color: # 333333; border width: 1px; border-color: # 666666; border-fall: collapse;" & Gt; & Lt; Thead & gt; & Lt; TR & gt; @work (model. Data formatforx.colum data column call in call) {& lt; Th style = "border: 1 px solid, width: 140px"; Font-size: 15px & gt; @ Col.ColumnName & lt; / Th & gt; } & Lt; / Tr & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; @yearach (Detarau line in Model.dataTableForXml.Rows) {& lt; Tr & gt; @Fournik (Data column call in Model.dataTableForXml.Columns) {& lt; Td style = "border: 1px solid, width: 140px; font-size: 15px" & gt; @row [col.ColumnName] & lt; / Td> } & Lt; / Tr & gt; } & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / Div & gt;    

You will need to create a form with the values ​​you want to save. / P>

Then create a new controller, which receives the model with the values ​​sent to you in the received method.

(Note: the attribute already received by default is not required) Your Controller:

  [httpPOST] Public Action Result Localfilehandler action (Datatable model datatel model) {// Valid model if (ModelState. ISI Walid) {// Save Logic} Return View (DatatableModel); }    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -