开发者

ASP.NET MVC: How to add a library via the using command

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜