从附件中删除特定文件 [英] remove particular file from attached files

查看:101
本文介绍了从附件中删除特定文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已附加了多个文件要上传.对于每个附件,我都具有删除"按钮.当我单击删除"按钮时,所有附件都将被删除.
因为页面刷新.

我希望删除每个&每删除按钮单击事件的特定文件.还有其他方法...我需要一些想法...

I have attached multiple file to upload.for each & every attachment i have remove button .when I click on remove button all attached files aregetting removed.
beacause of page refresh.

I want particular file to remove of each &every remove button click event. is there any other way...I need some Idea...

推荐答案

添加HTML按钮并通过Java脚本删除所选文档
Add a HTML button and remove the selected document through java script


您的删除按钮正在回发页面,这就是您丢失最后一页状态的原因.
一种简单的解决方案是使用视图状态恢复到最后一个状态.
我认为最好的解决方案是停止回发.而是使用ajax来满足这种情况.

有关视图状态的更多详细信息,请查看kb文章,
http://msdn.microsoft.com/en-us/library/ms972976.aspx [ ^ ]

有我!
欢呼
Your delete button is doing a postback to the page and that is the reason, you lost the last page state.

One simple solution is to use view state to regain to the last state.
The best solution, I see is stop doing postback. Instead use ajax to cater this situation.

For more details of view state, check kb articles,
http://msdn.microsoft.com/en-us/library/ms972976.aspx[^]

Got me!
cheers


这篇关于从附件中删除特定文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆