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

Define the types of configuration files.

973


Why we use asp.net for website development?

896


List all templates of the repeater control.

1080


Why viewstate is used in asp.net?

1017


If 200 is for all successful operation then why do we have 201 response codes?

913


How to display Alert in ASP.NET

1158


What is cas?

1034


Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?

970


Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?

1077


What is preprocessor in .net? Where it use?

974


How does the cookies work in asp.net?

1152


What does aspcompat="true" mean?

1024


What is cross page posting? How is it done?

959


Define tracing.

1109


Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?

2152