尽的结构是什么:LinkButton添加事件

来源:百度文库 编辑:中科新闻网 时间:2024/05/04 15:55:20
我在asp.net后台代码中动态创建了一些linkbutton
For i = 1 To 10
Dim templink As New LinkButton
templink.Text ="link"& i.tostring
templink.CommandName = "link" & i.tostring
templink.CommandArgument = i.tostring
next
但不知如何动态为他们添加服务器端的事件,事件需要在同一个函数中执行
请教高手

前台HTML:
<linkbutton id="id" name="name" onkick="kickbutton()" runat=server></linkbutton >

后台自定义事件:
public void kickbutton(object sender,System.EventArgs e)
{
把你的代码加进来
}