Navi's

Necessity, the mother of invention

  • Visitor Map

    Locations of Site Visitors
  • Flag Counter

    free counters

Delete Items from Listview using Deleting event

Posted by Navi's on January 7, 2010


You can delete items on Listview by Deleting Event

using this event

protected void ListView1_ItemDeleting(object sender, ListViewDeleteEventArgs e)
{
  Int32 Id = Int32.Parse(ListView1.DataKeys[e.ItemIndex].Value.ToString());
}

or you can get another key using

ListView1.DataKeys[e.ItemIndex]["Name"].ToString();

-n’s

One Response to “Delete Items from Listview using Deleting event”

  1. Robert said

    Hi,

    Its helped me …

    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: