未知的服务器标签&#;; asp:ScriptManager'

时间:2016-12-02 04:31:13

标签: asp.net ajax

def get_details(name, gender, age=0):

if age < 18:
    print("You are too young to register")
    return

if len(name) < 2:
    print("Looks like your name is too short")
    return

if gender is "M":
    gender = "Male"
elif gender is "F":
    gender = "Female"
else:
    gender = "Unknown"

print(name, gender, age)

我在asp updatepanel之前在母版页中使用了这段代码,并获得了错误未知服务器标签'asp:scriptmanager'。

2 个答案:

答案 0 :(得分:1)

The tagprefix in your @register and the tag in front of the scriptmanager i.e. here asp must match.

答案 1 :(得分:0)

尝试添加

<pages>
  <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  </controls>
</pages>

它修复了运行在特定Win Server 2016框(运行.NET 4.6.1)上部署我的应用程序时遇到的问题。