Can we capture the events like click of ASP.NET2.0 controls like link button at client side.
For example, there is a link button which performs some operations say download,when the checkbox of the GridView are checked.

But what if when the checkboxes are not checked and the link button is clicked, it will uselessly sends request to server and opens download box with no records.

Is there any way to capture this event at client side so that if the checkboxes are not checked alert soem message like "plz select record", and if call link button event only when atleast one checkbox is checked

Thanks in advance,

if (!chk.Checked)
LinkButton1.Attributes.Add("onclick", "return alert(' please select ')");

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.