在asp.net上oniteminserting和oniteminserted之间的区别

编程入门 行业动态 更新时间:2024-10-26 02:33:47
本文介绍了在asp上oniteminserting和oniteminserted之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在asp中的formview的insertitemtemplate中oniteminserting()和oniteminserted()之间的区别是什么? 我如何从formview中的只读模式转到查看数据我只插入那里?

解决方案

ItemInserted event 将被提出只有如果 FormView 数据绑定且数据源处理插入(并随后回调控件)插入后)。 我怀疑你没有将表单视图绑定到任何数据源控件(例如作为 SqlDataSource)。在 case 中,您计划通过编写自定义代码来处理插入数据存储,然后您应该 ItemInserting event 本身。

链接.. stackoverflow//questions/9565759/asp-net-formview-oniteminserting-and-oniteminserted [ ^ ]

项目插入事件将在项目插入完成后被提升 项目插入事件将在插入过程中被引发。

what is the difference between oniteminserting() and oniteminserted() in insertitemtemplate of formview in asp? and how can I go from insert mode to read only mode in formview to view the data I have inserted there only?

解决方案

ItemInserted event will be raised only if FormView is data-bound and the data-source handles the insert (and subsequently call backs the control after insert). I suspect that you have not bound your form-view to any data source control (such as SqlDataSource). In case, you are planning to handle inserting into the data-store by writing custom code then you should do that part in ItemInserting event itself.

Links.. stackoverflow//questions/9565759/asp-net-formview-oniteminserting-and-oniteminserted[^]

Item Inserted event will be raised once insertion of item is completed Item Inserting event will be raised while insertion process is ongoing.

更多推荐

在asp.net上oniteminserting和oniteminserted之间的区别

本文发布于:2023-11-09 20:19:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573332.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:区别   net   asp   oniteminserted   oniteminserting

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!