Posted on: 10/15/2013 3:01:11 PM | Views : 804

Hello there,
I use bellow code for remove item from datalist,
server side work good, but client side not work ($('dvItemTemplate').fadeOut();)
protected void BindDataList() { DirectoryInfo dir = new DirectoryInfo(Server.MapPath("~/Uploads/booksPic/Gallery/Images")); FileInfo[] files = dir.GetFiles(); ArrayList listItems = new ArrayList(); foreach (FileInfo info in files) { listItems.Add(info); } dtlistGallery.DataSource = listItems; dtlistGallery.DataBind(); } protected void dtlistGallery_DeleteCommand(object source, DataListCommandEventArgs e) { string filename = e.CommandArgument.ToString(); string filepath=Server.MapPath("~/Uploads/booksPic/Gallery/Images/"); File.Delete(filepath + filename); }
<script type="text/javas ...

Go to the complete details ...