一开始,ImageButton 事件不响应,
后来 我从工具箱从托 一个工具 Button 到页面上
写下事件,
Response.Write("dddd");结果事件不响应, 真说,郁闷,我看了 this.Button1.Click += new System.EventHandler(this.Button1_Click);
有事件 的注册,可就是不响应?

解决方案 »

  1.   

    this.Button1.Click += new System.EventHandler(this.Button1_Click),在2005里咋找到这句
      

  2.   

    <%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">    protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Write("asdfasdfawer");
        }
    </script><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />&nbsp;</div>
        </form>
    </body>
    </html>
      

  3.   

    真是 郁闷,美工在 页面中放了 一句:<form name="form1" method="post" action="">
    &nbsp;
    </form>
    我删掉了,事件就可以响应了谢谢  yanggood007(晓峰) ,给分