I just wonder that can we pass any type of class instances to view which is not exist in our Model repository.for example i just want to show property values of any class instance which exist in .net framework such as List, ListArray and others.
Question is edited cause misunderstanding possibility.
asp.net mvc 2.0 Jquery form submit
1:Pulling a View from a database rather than a file
Where Inherits="...ProductViewModel" is whatever type you want the
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication1.Controllers.ProductViewModel>" %>
.Modelvariable to be and thusly need be supplied by the controller.. Asp.net MVC Binding
You indeed should be able to access any class in your app / includes within your views, although you have to qualify them with a namespace. Only a few namespaces are included by default.. Here is an article this explains how to add namespaces to the Web.Config so you must access classes in this namespace directly in your views:. http://davidhayden.com/blog/dave/archive/2009/10/13/ViewNamespacesInWebConfig.aspx.
<pages> <namespaces> <add namespace="System.Web.MVC"/> <add namespace="System.Web.LINQ"/> <!-- ... --> <!-- Add more namespaces you need here --> </namespaces> </pages>
<%@ Import Namespace="System.Collections.Generic" %>. msdn.