Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is Model Binding for MVC only?
Message
From
01/07/2014 12:53:54
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01602973
Message ID:
01603000
Views:
51
>I just listened to a Pluralsight course on mobile web applications. A topic of Model Binding came up in the course as a suggestion to eliminate ViewState. My question; is Model Binding applicable to ASP.NET MVC only; or it can be used in ASP.NET Web Forms?
>
>UPDATE:
>Found this link http://blogs.msdn.com/b/webdev/archive/2013/03/28/tutorial-series-on-model-binding-with-asp-net-web-forms.aspx which probably answer my question.

I guess it works - but, to me, it looks horrible. For instance, the models contain information about the view (e.g 'Display Name') and have methods that imply knowledge of the view (e.g. 'studentsGrid.GetData'). Admittedly the latter is only because of the chosen method name - but you might equally wish, in a different view, to display students as a list, write it to a PDF, or, or......

I've given up on Web Forms entirely - re-delivering the whole page from the server every time the data changes seems silly.

Using static html pages and WebApi with, for instance, angular is so much more flexible (and faster).

BTW, have you looked at TypeScript (or CoffeeScript) instead of plain JavaScript - it takes you a long way towards having strongly-typed objects (with type checking and intellisense) in JavaScript which can then be easily mapped to C# objects on the server.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform