本文介绍了在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之间的区别
发布评论