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 to magage the state manament in asp.net with respect to in_prock and out_prock

1 Answers   Aviva,


What is the state management in asp.net?

0 Answers  


How do you store a value in viewstate and retrieve them?

0 Answers  


Any disadvantages in Dataset and in reflection ?

0 Answers   DELL, Digital GlobalSoft,


What is simple data binding?

0 Answers  


I need some questions regarding asp.net for 1.5yrs of Experience.

1 Answers  


What is GAC in ASP.NET 2.0

0 Answers   MCN Solutions,


Explain a program using razor view engine to create a simple application? : asp.net mvc

0 Answers  


How do you retrieve information from web.config ?

5 Answers   MMTS,


web farm .. how does session shuld be stored... if inproc used? does the session persists from one server to other.

2 Answers   TCS,


About the Usage of htmlencode and urlencode ?

2 Answers   Cognizant,


How does a content page differ from a master page?

0 Answers  


Categories