tags:

views:

39

answers:

3

I am trying to load generics within the aspx page. Here is my code

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>


<div id="CategorySelectBoxes">
<%  
    //this has syntax error
    using System.Collections.Generic;

    //get parentid list
    category c = new category();

is there a way to load the generic library?

+2  A: 
<%@ Import Namespace="System.Collections.Generic" %>
Diadistis
+2  A: 

Check this MSDN help topic.

korchev
+3  A: 

You can load it using the import directive either on the master page or for your view

<%@ Import namespace="System.Collections.Generic" %>
stimms