下面是我的代码:
默认.aspx:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="TestAjax._Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
//I set an onClick event on this button:
< input type = "button" id="btnCl" onclick = "doJob" />
</asp:Content>
默认.aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
//fires on page load;
}
void doJob()
{
//code here;
}
问题是:
为什么没有触发 onclick 事件?(在 default.aspx btnCL 上)
谢谢