C# 双击中继器上的链接按钮?

C# 双击中继器上的链接按钮?,c#,asp.net,repeater,C#,Asp.net,Repeater,我有一个中继器上的链接按钮。我的问题是,我怎样才能让linkbutton在中继器中双击,而不是一次单击 这是我的密码: <td class="style2"> <asp:LinkButton ID="lblName" runat="server" Text='<%# Bind("Name") %>' CommandName="Name" CommandArgument='<%# Eval("Code") %>'> </

我有一个中继器上的链接按钮。我的问题是,我怎样才能让linkbutton在中继器中双击,而不是一次单击

这是我的密码:

    <td class="style2">
    <asp:LinkButton ID="lblName" runat="server" Text='<%# Bind("Name") %>' CommandName="Name" CommandArgument='<%# Eval("Code") %>'>
    </asp:LinkButton></td> 

C#

protectedvoid rptrInsurance\u ItemCommand(对象源,RepeaterCommandEventArgs e)
{
尝试
{
如果(e.Item.ItemType==ListItemType.Item | | e.Item.ItemType==ListItemType.AlternatingItem)
{
开关(例如CommandName)
{
案例“删除”:
{
HCSInsurance Oinsurance delete=新的HCSInsurance();
保险=新保险();
List lstName=oInsuranceDelete.RetrieveInsuranceList();
foreach(名称中的保险标签项目)
{
var code=e.CommandArgument;
如果(item.InsuranceCode.ID==code.ToString())
{
oInsurance.InsuranceCode=项目.InsuranceCode;
oInsurance删除。删除保险(oInsurance);
bind();
}
}
}
打破
案例“编辑”:
{
会话[“InsuranceCodeID”]=e.CommandArgument.ToString();
重定向(“~/InsuranceCarrierNew.aspx”);
}
打破
违约:
{
//bind();
HCSInsurance OhcInsurance=新的HCSInsurance();
保险=新保险();
字符串代码=Convert.ToString(例如CommandArgument);
oInsurance=OHCInsurance.RetrieveInsurance(代码);
Labelvisible();
//串
lblName.Text=oInsurance.Name;
lblAddress.Text=oInsurance.Address1;
lblCity.Text=oInsurance.City;
lblState.Text=oInsurance.State;
lblZip.Text=oInsurance.Zip;
lblDphone.Text=oInsurance.contactphone;
lblDfax.Text=oInsurance.ContactFax;
}
打破
}
}
}
捕获(例外情况除外)
{
}
}

当您知道客户端存在您想要实现的目标时,有一个用于双击的事件,如:

$('id').dblclick(function() {
     // Call something here.
});
这样做的缺点是,您可能希望通过AJAX调用而不是回发来更改实现,也可能只提交表单并编辑后端代码所需的参数

$('id').dblclick(function() {
     // Call something here.
});