c# - How to find out If user has made any changes in row inside table. Asp.net MVC -


i have table code this.


   <% using (html.beginform()) {%>     <table>           <tr>             <th>title</th>             <th>author</th>             <th>date published</th>         </tr>          <td>     <%: html.textboxfor(m => m.title) %>     <%: html.validationmessagefor(m => m.title) %> </td> <td>     <%: html.textboxfor(m => m.author) %>     <%: html.validationmessagefor(m => m.author) %> </td> <td>     <%: html.textboxfor(m => m.datepublished) %>      <%: html.validationmessagefor(m => m.datepublished) %> </td></table>   <input type="submit" value="create" />   <% } %> 

inside model:

public class book {     public string title { get; set; }     public string author { get; set; }     public datetime datepublished { get; set; } } 

if user change value in table how track row value has been changed.

thanks in advance.

on controller, query db old values , check each row see if changed. can't imagine other (secure) option.

if you're trying make view tell controller row changed, not best solution since users intercept request , change values before reaches server.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -