提问:错误提示--命名空间“System.Web”中不存在类型或命名空间名称“UI”(是缺少程序集引用吗?) 如何解决??

转自:http://topic.csdn.net/u/20080723/21/7e1e06cb-d013-4675-ba9b-9b39d49d0a0e.html

1) 添加对System.Web.dll的引用
2) SortDirection枚举在System.Web.UI.WebControls命名空间下,添加了System.Web.dll的引用后,再using此命名空间就可以了
这种问题查查msdn嘛,上面都写了
------------------------------------------------
注意:此枚举在 .NET Framework 2.0 版中是新增的。  

指定对项列表进行排序的方向。  

命名空间:System.Web.UI.WebControls
程序集:System.Web(在 system.web.dll 中)

语法  
C#  
public enum SortDirection
原文地址:https://www.cnblogs.com/hjtdlx/p/4401479.html