开发者

how to find linkbutton id in javascript,

my linkbutton is in datalist, this datalist is in panel, this panel is in ajax updatepanel

if linkbutton is not selected then need to alert a message...

how can i achieve开发者_开发技巧 this...


There are many ways you can achieve this, here is an example:


aspx:
<asp:LinkButton ID="lnk1" runat="server" OnClientClick="fireMyClick(this)"></asp:LinkButton>
js:
function fireMyClick(lnk)
{
    alert(lnk.id);
}


page.findcontrol(panlid).findcontrol(datalistid).findcontrol(linkbutonid)

i wrote code like this....

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜