【发布时间】:2013-12-01 11:39:53
【问题描述】:
我正在使用 Asp.net MVC 做一个应用程序,在模型中,我需要检查我要显示的视图页面是否有特定 id 的元素。我尝试使用 WebBrowser 类来遍历我的视图页面,但它显示如下错误消息。
`ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.`
在WebBrowser 班级。
所以任何想法来解决这个问题。
【问题讨论】:
-
你完全误解了 MVC 是什么
-
您知道视图页面是否有具有特定 id 的元素,因为您自己编写了视图页面并将该元素放在 .cshtml 或 .aspx 文件中。
标签: c# html .net asp.net-mvc asp.net-mvc-4