protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { String postBackReferenceForListBox = this.Page.GetPostBackClientEvent(btnForListBoxDoubleClick, "dblClickfromHiddenButton"); ListBox1.Attributes.Add("ondblclick", postBackReferenceForListBox); } catch (Exception ex) { } } } private void btnForListBoxDoubleClick_ServerClick(object sender, System.EventArgs e) { try { string argument = Request.Params["__EVENTARGUMENT"].Trim(); if (argument == "dblClickfromHiddenButton") { Response.Write("HI"); // logic to process the selected item from listbox goes here } } catch (Exception ex) { } }
ListBox1.Attributes.Add("ondblclick", ClientScript.GetPostBackEventReference(ListBox1, "move"));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)