View Single Post
  #2 (permalink)  
Old May 3rd, 2011, 04:51 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Phil,

What exactly are you trying to accomplish? RowCommands fire at the server, while JavaScript runs at the client. This means you cannot "call Javascript functions from a Gridview RowCommand". However, there are ways to fire JavaScript before the command is triggered (that is, before the postback) or after it has run when the page reloads.

Knowing what it is you're after helps me recommending a good strategy.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote