top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are HTML Helpers in ASP.NET MVC?

0 votes
348 views
What are HTML Helpers in ASP.NET MVC?
posted Sep 1, 2016 by Sathaybama

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote

HTML Helpers are like controls in traditional web forms. But HTML helpers are more lightweight compared to web controls as it does not hold viewstate and events. HTML Helpers returns the HTML string which can be directly rendered to HTML page. Custom HTML Helpers also can be created by overriding "HtmlHelper" class.

answer Mar 14, 2017 by Jdk
0 votes

-In ASP.NET MVC, HTML Helpers are almost similar to ASP.NET web form controls which are used for modifying the HTML.

-HTML helper does not have an event model and a view state.

-HTML helpers are more lightweight than traditional ASP.NET web forms controls.

-In MVC, custom user defined HTML helpers can be created or we can use the built in HTML helpers.

  • For example ListBox(), BeginForm(),TextBox(), EndForm(), , TextArea(),RadioButton() are built in HTML helpers.
answer Sep 2, 2016 by Shivaranjini
...