0
이것은 매우 이상합니다. MVC 뷰는 System.Speech 네임 스페이스를 인식하지 못합니다. 거래는 뭐니? 그리고 이것에 대한 해결 방법이 있습니까? 이 네임 스페이스에서 VoiceAge 및 VoiceGender 열거 형 속성이있는 ViewModel이 있지만 MVC보기에서 볼을 재생하지 못합니다.MVC보기 및 System.Speech.Synthesis 네임 스페이스
생식
- 는 "System.Speech"참조에게보기에서 System.Speech 네임 스페이스로 이동하는
- 보십시오 추가 새로운 MVC 3 프로젝트를 만듭니다
컨트롤러에서 아무런 문제가 없습니다 :
using System.Speech.Synthesis;
using System.Web.Mvc;
namespace MvcApplication6.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
VoiceAge voiceAge = VoiceAge.Adult;
return View();
}
}
}
,
보기, 순전히 :
나는 심지어의 Web.config에 네임 스페이스를 추가 한, 운이 없다 :
<pages>
<namespaces>
<add namespace="System.Speech.Synthesis" />
감사합니다. Darin에게 감사드립니다. 너는 생명의 은인이야! – Levitikon