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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / krishna prasad

in databound event
foreach(dataview/datagrid items)
{
find the linkbutton(objLinkButton) row.findcontrl
("LinkButtonID")
objLinkButton.attributes.add("onClick","return "validates
();")
}

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

Dategrid filtering and sorting How can we sort all the fields at once?

3 Answers   Satyam,


What language is asp.net written in?

0 Answers  


how we can solve machine key error in asp.net?

3 Answers  


Describe the .net base class library.

0 Answers  


Where does Web.Config Info stored? Will this be stored in the registry?

4 Answers   Accenture,


How can we prevent browser from caching an aspx page?

0 Answers  


what are the ihttphandler and ihttphandlerfactory interfaces ?

0 Answers  


can I use session variable in App_code Class page??

3 Answers   Wipro,


Is it possible to create web application with both webforms and mvc?

0 Answers  


Which two new properties are added in asp.net 4.0 page class?

0 Answers  


what is the differance between native code & managed code?

5 Answers   Microsoft,


Explain the asp.net mvc request life cycle? : asp.net mvc

0 Answers  


Categories