Is there a way to have heavily typed WebForms similar to MVC Views?

I recently fell in love with the ASP.NET MVC world, and one of my favorite parts is the fact that I can have strongly typed views, and when I send data to the service level, all I need to do is provide a model object and do with it.

This contrasts sharply with the rather large-scale WebForms application that I create last year. The problem with this application was that the client needed (required) more than 150 fields for the table for two of its tables (the fact that the "names" field was numbers is more and more disappointing, but that's another story).

What I found (in many forms) was as follows.

Dim bfs As New BusinessForSale

With bfs
    .123 = txt123.Text
    .124 = txt124.Text
    ''# etc
    ''# etc
    ''# 148 more bloody times
End With
''# Yes it was that frigging frustrating.

Then I could pass the bfs object to the database.

Now in MVC, the model takes care of all this for me.

? ( , - WebForms, ), "" , ? , - .

+3
2

-; , . , , - . MVP- Nucleo (http://nucleo.codeplex.com), ( AJAX). , .

, , , . , ASP.NET MVC (- ), - , , .

.

+1

, .

+1

Source: https://habr.com/ru/post/1777354/


All Articles