Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted

C#
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[^]
 
Share this answer
 
v2
Comments
Member 11242836 26-Nov-14 7:47am    
Thank you.!
Item Inserted event will be raised once insertion of item is completed

Item Inserting event will be raised while insertion process is ongoing.
 
Share this answer
 
Comments
Member 11242836 26-Nov-14 7:47am    
Thank you.!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900