Good or bad practice using regular html

It’s convenient using html, it’s easier for me to just use regular html in my views, for example, creating a text field with <input type="text" maxlength="30" name="firstname"><% = html.textbox ("firstname")%> instead. Or <form method="post" name="myform">instead <% html.beginform() { %>.

Is this considered bad practice? Should I force myself to use helpers, etc.? Will I encounter problems if I continue to use regular html?

Just what I was interested in, since most of the examples and things that I see on the Internet use all of the above helpers and methods ...

+3
source share
6 answers

- PHP . - , , - ( javascript, , ), . HTML-, .

+3

HTML runat = "server" , .

ASP.NET , (, , ) , , , javascript. viewstate, (!) . HTML.

, , ASP.NET ( ) HTML-. WYSIWYG, , , , , .

+1

HTML . ; , HTML, , HTML . , , , . , , , / -.

+1

, - "" .

  • , HTML.
  • , , - , , , . "BeginForm".

, .

+1

Html html . , Html.BeginForm actionurl ( , ). actionurl, , . Htmlhelper, Webform. . html-, . mvc gridview.

0

When I first worked on MVC, I tried to use Html Helpers and even create my own helpers. However, when I tried to use jQuery / Ajax in my application, I try to use more and more raw HTML. I don't think using raw HTML is bad practice. If you need more control on the client side, it will be easier for me to work with the source HTML.

0
source

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


All Articles