6
I have a webform Imagebutton that represents directories on a grid using Peater. How to make with 1 click just select the button, and only open with two clicks?
 <asp:Repeater ID="rtInlineBlock" runat="server">
                        <ItemTemplate>
                            <div class="block">
                                <asp:HiddenField ID="idDirectorio" runat="server" Value='<%# Eval("guid") %>' />
                                <asp:ImageButton ID="btSend" runat="server" ImageUrl='<%# Eval("imgPath") %>' OnClick="btSend_Click" />
                                <div class="bottom">
                                    <asp:Label ID="lblNome" runat="server" Text='<%# Eval("xInfo") %>' />
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>  
Codebehind:
 protected void btSend_Click(object sender, ImageClickEventArgs e)
    {
        var btSend = sender as ImageButton;
        var rtItem = btSend.Parent as RepeaterItem;
        var idDiretorioSelecionado = rtItem.FindControl("idDirectorio") as HiddenField;
        //faz algo
        }
I just want you to enter this example with double click.
That way it already calls the event by clicking 1 time, wanted to click 1 time just select and I can treat it, and with two open the event.
you can show your Behind code?
– Vinícius
I just updated...
– War Lock
Any solution? with js?
– War Lock
I’m not an expert on Webforms, so I need to run some tests first. But at first glance, if you are using jQuery, you can use the dblclick event().
– Vinícius
here already has the bootstrap with jquery, however I do not know how to use this function, if I can post the answer the solution would be better
– War Lock