我正在學習JavaScript客戶端腳本語言和我正在使用ASP JS ..我不知道當我編譯的代碼,它顯示的JavaScript到ASP頁
COMPILATION ERROR:Compiler Error Message: CS1061: 'ASP.default_aspx' does not contain a definition for 'popup' and no extension method 'popup' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?)
這裏是我的代碼:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WEB_test_app._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 runat="server">
<title>Shuraat Web ki</title>
<script type ="text/javascript">
function popup()
{
alert("popup!!");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick ="popup()"/>
<script type ="text/javascript">
document.write("Abid");
</script>
</div>
</form>
</body>
</html>
有人可以編輯代碼:/ ..請.. – 2011-02-13 08:34:35
我不知道如何編輯..:/抱歉 – 2011-02-13 08:35:01