开发者

LinkButton Click event ignored

I have the following Hype开发者_JS百科rlink as a button:-

<asp:LinkButton ID="loginButton" runat="server" CssClass="loginButton" Text="LOGIN" OnClientClick="return validateLogin(memNoID,pwID)" AddressOf="loginButton.Click"></asp:LinkButton>

It causes a postback but only executes the onload and prerender sections of code. It totally ignores the following function signature:-

Protected Sub loginButton_Click(ByVal sender As Object, ByVal e As EventArgs)

Some code

End Sub

Any pointers appreciated.


Add OnClick in your code:

<asp:LinkButton ID="loginButton" runat="server" CssClass="loginButton" Text="LOGIN" OnClientClick="return validateLogin(memNoID,pwID)" OnClick="loginButton_Click" AddressOf="loginButton.Click"></asp:LinkButton>


Did you try adding your _Click method to the OnClick event?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜