About the author

Vijay Kodali
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2024

Click event for Listbox

In Asp.Net ListBox, there are no events for Click action. The follwing code is useful in this regard..

 

[code:c#]

protected void Page_Load(object sender, EventArgs e)

{

if (Request["__EVENTARGUMENT"] != null && Request["__EVENTARGUMENT"] == "submit")    {       

//your code for click action

                                                      }

ListBoxNames.Attributes.Add("ondblclick", ClientScript.GetPostBackEventReference(ListBoxNames, "submit"));

}

[/code]


Categories: ASP.NET | C#
Posted by vijay on Wednesday, September 12, 2007 12:57 PM
Permalink | Comments (2) | Post RSSRSS comment feed

Comments

srini India

Friday, November 27, 2009 4:15 PM

srini

It is Not working in asp.net 2005.

vijay United States

Wednesday, December 2, 2009 10:09 PM

vijay

@Srini, It should work in Asp.Net 2.0. If not, post all relevant code.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading