我有一个MVC 3应用程序我正在尝试使用Facebook身份验证,但无论出于何种原因,我的应用程序中无法识别命名空间。
在我的_Layout.cshtml文件(MVC 3的母版页)中,我把:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
然后在我的家中索引:
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<p>
<fb:login-button v="2" size="medium" onlogin="window.location.reload(true);">My Facebook Account</fb:login-button>
</p>
当页面呈现时,它显示我的Facebook帐户文本,但没有按钮!
Visual Studio也在抱怨“fb是一个无法识别的命名空间”......
命名空间是否传递给视图?为什么“fb”不被识别,即使它在_Layout.cshtml中?