Like in ASP.NET or Active Server Pages, ASP.NET MVC does not have anything that directly represents a page. In MVC, you have views.
You can access views through controller actions.
Adding content to a View
A view is a standard XHTML document that can contain scripts. You can use scripts to add dynamic content using script delimeters ( <% %> ). You can also use HtmlHelpers to add content.
You can use ViewData from controller action to pass data to the view. It is a collection of name-value pairs.
HtmlHelper
Support for rendering HTML controls in a view. Class provides methods that help you create HTML controls programmatically. All HtmlHelper methods generate HTML and return the result as a string.
TagBuilder (tutorial)
ASP.NET MVC framework also includes utility class named TagBuilder when building HtmlHelpers.
TagBuilder (tutorial)
ASP.NET MVC framework also includes utility class named TagBuilder when building HtmlHelpers.
0 comments:
Post a Comment