onclick事件不是从aspx页面中的转发器触发

时间:2016-01-22 06:48:39

标签: javascript asp.net

我正在从转发器中搜索字符明智的记录。但是点击按钮时它没有响应或事件没有触发。点击时调试按钮不会出现。

<asp:Repeater ID="rptAlphabets" runat="server">
        <ItemTemplate>
            <asp:LinkButton ID="LinkButton1" runat="server" Text='<%#Eval("Value")%>' Visible='<%# !Convert.ToBoolean(Eval("Selected"))%>'
               OnClick="alphabetClick_Click" />
            <asp:Label ID="Label1" runat="server" Text='<%#Eval("Value")%>' Visible='<%# Convert.ToBoolean(Eval("Selected"))%>' />
        </ItemTemplate>
    </asp:Repeater>



 protected void alphabetClick_Click(object sender, EventArgs e)
    {
        LinkButton lnkAlphabet = (LinkButton)sender;
        ViewState["CurrentAlphabet"] = lnkAlphabet.Text;
        this.GenerateAlphabets();
        gvPaymentstatus.PageIndex = 0;
        this.BindGrid();

    }

0 个答案:

没有答案