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 the asp.net control toolkit?

0 Answers  


How do we ensure view state has not tampered?

0 Answers  


Can we handle the error and redirect to some pages using web.config?

1 Answers   BirlaSoft,


What are the new login controls in asp.net 2.0?

0 Answers  


Explain the difference between AutoPostBack and IspostBack in ASP.NET?

0 Answers   Sans Pareil IT Services,


What is a web api endpoint?

0 Answers  


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

3 Answers  


What object is used to encapsulate a rowset? a) DataSet b) DataAdapter c) DataRowSet d) DataTable

2 Answers   Syntax Softtech,


Which method is used to force all the validation controls to run?

0 Answers  


What are the main advantages of using asp.net?

0 Answers  


Why select Web API?

0 Answers  


what is the difference between this.controls and page.form1.controls and me.controls?

2 Answers   FactorH,


Categories