Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is Model Binding for MVC only?
Message
 
 
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:
01603007
Views:
40
>>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.

Thank you very much for your input on model bining in Web Forms. I have not looked at TypeScript or CoffeeScrip and do not really what these technologies are all about. But the bottom line you are strongly suggesting ASP.NET MVC; correct? Not the first time, of course. In this case, if I were to go the ASP.NET MVC route, first I need to learn Entity Framework. Which I started and then never finished. :(.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform