Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an editor template in which I display a list of objects. These can be modified by the user. I want to postback only modified objects or to somehow mark from UI using js I guess the dirty objects. Can you please point to the right direction of how i can do this? Thank you
Posted
Comments
Kornfeld Eliyahu Peter 16-Nov-14 9:54am    
http://mattgemmell.com/what-have-you-tried/
Member 11237865 16-Nov-14 15:58pm    
I've added a property to my model IsValueChanged false by default. I keep this is a hidden field on my view. In my editor template I have

@Html.TextBoxFor(m => m.SassVar, new { @onchange = "{@Model.IsValueChanged = true}"})

Unfortunately when inspecting the page after load all these values are true.

I also tried writing some js script but it doesn't execute, i guess it has something t do with the fact that is an editor template.. please help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900