嗨我正在嘗試使用簡單的ajax UpdatePanel ..但仍繼續收到錯誤 「Microsoft JScript運行時錯誤:'ID'未定義」我嘗試朗讀這一頁。 任何人都可以幫助我請它。Ajax錯誤「Microsoft JScript運行時錯誤:'ID'未定義」
代碼如下: -
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Hello, world!</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="MainScriptManager" runat="server" />
<asp:UpdatePanel ID="pnlHelloWorld" runat="server">
<ContentTemplate>
<asp:Label runat="server" ID="lblHelloWorld" Text="Click the button!" />
<br /><br />
<asp:Button runat="server" ID="btnHelloWorld" OnClick="btnHelloWorld_Click" Text="Update label!" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
在此先感謝..
你有代碼隱藏文件中的任何代碼? – Dean 2012-09-06 00:56:07