Wednesday, July 21, 2010

Attach double click event on listbox in asp.net

when we want to attach double click event on asp.net listbox we can make by using javascipt.


protected void Page_Load(object sender, EventArgs e)
{
if (Request["__EVENTARGUMENT"] != null && Request["__EVENTARGUMENT"] == "myListBox_Dblclk")
{

//your code to perform task or to call desired function

}
myListBox.Attributes.Add("ondblclick", ClientScript.GetPostBackEventReference(myListBox, "myListBox_Dblclk"));
}
by: Rajesh Rolen

Share This!


3 comments:

Anonymous said...

hello there thanks for your grat post, as usual ((o:

TerRaX said...

thx, very useful

TerRaX said...

thx, very useful

Powered By Blogger · Designed By Seo Blogger Templates