Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you add a javascript function for a link button in a
datagrid?

Answer Posted / ish

Make object of particular button

Ex:

LinkButton lnbDelete=(LinkButton) e.Item.FindControl
("Delete");

After that we can use it with JavaScript:
lnbDelete.Attributes.Add("Onclick","javascript:return
confirm('Are you sure you want to delete this?');");

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is server side routing?

968


What is the file through which you can customize your asp.net application?

1141


Is viewstate secure?

1007


Explain how do you validate the controls in an asp .net page?

977


In which event of the page life cycle, is the viewstate available?

1043


How to bind all the binding controls in a page at once in ASP.NET?

1010


Explain about consistent programming model in the .NET framework?

1182


What are the differences between clr & cts?

1128


What is Forms Authentication in ASP.NET?

1140


Can you nest updatepanel within each other?

1040


How many types of cache are there?

1044


Why Unload event of MasterPage Calls first in ASP.net ?

1083


Give an example of what might be best suited to place in the application_start and session_start subroutines?

1013


What is distributed system in asp.net?

1073


Why we use content place holder in asp.net?

1091