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?
You can load it using the import directive either on the master page or for your view
<%@ Import namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Collections.Generic" %>
Check this MSDN help topic.
精彩评论