Posted on: 7/7/2014 3:37:19 PM | Views : 421

I have a Formview usually working in ReadOnly Mode. In order to add a new record a click on a LinkButton switches the Formview-mode to Insert mode
In the SQLDataSource Insert Command I check the input data and only insert a new record if the data was correct. So far, so good.
I use the OnInserted Event to inform if the data had been correctly added and to switch back to the "New Record" form in case it had not. Now, hhis is not working! I always end up in ReadOnly mode. I am missing something... but what?
The form:
<asp:FormView runat="server" ID="NewRecord" DataSourceID="ChordMod"> <InsertItemTemplate> <table> <tr> <td>New:&nbsp;</td><td><asp:Textbox Text='<%# Bind("pattern") %>' runat="server" id="TextBoxNuevo" / ...

Go to the complete details ...