Dynamic
Because we’re using a dynamic and not a strongly typed view, intellisense doesn’t help us. The completed code is shown below:
@model dynamic
@ {
ViewBag.Title = "IndexNotStonglyTyped";
}
Index Not Stongly Typed< /h2 >
< p >
< ul >
@foreach (var blog in Model) {
< li >
< a href="@blog.URL">@blog.Name< /a >
< /li >
}
< /ul >
< /p >
Strongly Typed Views
When it is strongly typed view.
Inside the new view template we get intellisense support.
No comments:
Post a Comment
Comments Welcome