How to register assembly in Razor view engine
问题 How can i insert this in razor view page <%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %> <asp:ScriptManager runat="server" ID="MainScriptManager" /> 回答1: You can put it in the Web.Config that exists in your Views folder . It took me a while to figure this one out hope this helps. <system.web> <controls> <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc"