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

what is impersonation in ASP.NET?

7 Answers   Accenture, Merrill Lynch, Wipro,


Which is an advantage of application service providers?

0 Answers  


what is the assembly?

2 Answers  


What are the different types of proxy patterns?

0 Answers  


What is Model-View-View Model?

0 Answers   MCN Solutions,


What Are Different Types of Debbugers

2 Answers   Accenture, TCS, Wipro,


Describe in brief .net framework and its components.

0 Answers  


what is shared assembly?

2 Answers   Microsoft,


Why will you usually create an aspnet user account in the database for an asp.net web application?

0 Answers  


What is redirecting behavior?

0 Answers  


Explain the difference between panel and groupbox classes using .net?

0 Answers  


They mostly asked difference between versions of technologies

0 Answers   Mphasis,


Categories