Saeid
Saeid

Reputation: 13582

Select a Generic Type as a Model to Generate Strongly Typed View in ASP.NET MVC

in ASP.NET MVC(3) when we want to add a new View we can select a type as a Model for generate a strongly typed view, but I try to select a generic Type and I can't find it in List, this maybe because a generic type is not a strongly type, but also there is must be a way to pass a type to T4, Does any one have any idea about it?

Upvotes: 0

Views: 517

Answers (1)

Simon Edström
Simon Edström

Reputation: 6619

You can type whatever type you want, for example this is possible:

    @model System.Collections.Generic.List<String>

All the namespaces are not showed in the dialog for Add View, but you can type whatever you want.

Upvotes: 1

Related Questions