在asp.net上oniteminserting和oniteminserted之间的区别 [英] difference between oniteminserting and oniteminserted in asp.net

查看:106
本文介绍了在asp.net上oniteminserting和oniteminserted之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在asp.net中的formview的insertitemtemplate中oniteminserting()和oniteminserted()之间的区别是什么?

我如何从formview中的只读模式转到查看数据我只插入那里?

解决方案

 ItemInserted  event 将被提出只有如果 FormView  数据绑定且数据源处理插入(并随后回调控件)插入后)。 

我怀疑你没有将表单视图绑定到任何数据源控件(例如作为 SqlDataSource)。在 case 中,您计划通过编写自定义代码来处理插入数据存储,然后您应该< span class =code-keyword> ItemInserting event 本身。





链接..

http://stackoverflow.com//questions/9565759/asp-net-formview-oniteminserting-and-oniteminserted [ ^ ]


< blockquote>项目插入事件将在项目插入完成后被提升



项目插入事件将在插入过程中被引发。


what is the difference between oniteminserting() and oniteminserted() in insertitemtemplate of formview in asp.net?
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..
http://stackoverflow.com//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之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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