Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to create a Delete button in a GridView which calls a Javascript function?

Reply
Thread Tools

How to create a Delete button in a GridView which calls a Javascript function?

 
 
Miguel Dias Moura
Guest
Posts: n/a
 
      04-05-2006
Hello,

In an Asp.Net 2.0 GridView I have ButtonField for deleting the record.
I used .CommandName = "Delete".

I want to cancel this server side action.
I want, instead, the button to call a javascript function on the client
side.
And I need to send to that javascript function the RowIndex.

How can I do this?

Thanks,
Miguel

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGF1bCBaYW5iYWth?=
Guest
Posts: n/a
 
      04-05-2006
http://www.mycodekb.com/CodeDetails.asp?CodeID=437
--
Paul Zanbaka
Sharepoint Adminstrator and DBA
www.mycodekb.com


"Miguel Dias Moura" wrote:

> Hello,
>
> In an Asp.Net 2.0 GridView I have ButtonField for deleting the record.
> I used .CommandName = "Delete".
>
> I want to cancel this server side action.
> I want, instead, the button to call a javascript function on the client
> side.
> And I need to send to that javascript function the RowIndex.
>
> How can I do this?
>
> Thanks,
> Miguel
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Api to create document and add,edit,delete text and t Krithika San Ruby 3 11-14-2009 09:29 PM
How to disable a GridView delete button depending on a value in the datasource? keithb ASP .Net 3 12-12-2008 11:16 PM
Dynamic template for a delete button in gridview =?Utf-8?B?TmF0ZURhd2c=?= ASP .Net 3 08-15-2006 02:23 PM
Dynamic template for a delete button in gridview =?Utf-8?B?TmF0ZURhd2c=?= ASP .Net 0 12-08-2005 05:57 AM
hitting enter button while in textbox calls correct button's click event TS ASP .Net 5 11-29-2005 01:54 AM



Advertisments