无法使用gridview删除数据
我正在使用 asp.net 4.0 构建一个文档上传器网络系统。 我被困在网格视图中。我可以从gridview中删除数据。 SQL 表中的数据被删除,但存储在我的文件夹中的文档仍然存在。
我希望当用户在 gridview 中单击“删除”时删除该文档..是否可能..已经为此工作了几天..
提前致谢。
I am building a document uploader web system using asp.net 4.0 .
I am stuck in gridview. I can delete the data from gridview. The data gets deleted in the sql table, but the document, which is stored in my folder remains.
I want the document to get deleted when user clicks delete in gridview..is it possible..have been working days on this..
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
gridview 有一个
RowDeleted
事件,删除一行后会触发该事件,您必须在该事件中编写逻辑。喜欢...There is a
RowDeleted
event of gridview which is fired after the deletion of a row, you have to write logic in this event. like...您只需在 GridView 的 OnRowDeleting 事件末尾调用以下行即可:
关于如何查找文档路径,您可以访问以下链接查看不同的示例:
http://www.dotnetperls.com/path
You can simply call the following line at the end of your GridView's OnRowDeleting event:
About how to find a document path, you can visit the following link to see different examples:
http://www.dotnetperls.com/path