LinkButton为什么不能触发Onclick事件
如题:
html代码:
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" align="center">第<%= CurrentPageIndex+1%>页</td>
<td width="10%" align="center">共<%= pagecount %>页</td>
<td width="10%" align="center"><asp:LinkButton ID="FirstPage" runat="server" Text="首页" OnClick="FirstPage_Click"></asp:LinkButton></td>
<td width="15%" align="center"><asp:LinkButton ID="LinkUp" Text="上一页" runat="server" OnClick="LinkUp_Click"></asp:LinkButton></td>
<td width="15%" align="center"><asp:LinkButton ID="LinkDown" runat="server" Text="下一页" OnClick="LinkDown_Click"></asp:LinkButton> </td>
<td width="9%" align="center"><asp:LinkButton ID="LastPage" runat="server" Text="末页" OnClick="LastPage_Click"></asp:LinkButton></td>
<td width="15%" align="center">到
<label>
<asp:TextBox ID="text1" runat="server" CssClass="input_ye"></asp:TextBox>
</label>
页</td>
<td width="16%" align="center"><label>
<asp:Button runat="server" ID="button1" Text="查看"/>
</label></td>
</tr>
</table>
后台代码:
protected void FirstPage_Click(object sender, EventArgs e)
{
this.text1.Text = "sdfsfsdf";
//ListPage(0);
}
void ListPage(int PageIndex)
{
CurrentPageIndex = PageIndex;
PagedDataSource page = new PagedDataSource();
page.AllowPaging = true;
page.PageSize = 5;
page.DataSource = UnuserResult.getset(DateTime.Parse(starttime.Text), DateTime.Parse(endtime.Text), username).Tables[0].DefaultView;
page.CurrentPageIndex = PageIndex;
pagecount = page.PageCount;
repeater1.DataSource = page;
repeater1.DataBind();
}
为什么click里面的事件不执行呢?