D
David
Hello.
I have a formview object that shows a record and lets users update
fields, and they then press the "update" button, and I want it to update. It
looks like pretty standard stuff, but it doesn't update.
Here's my formview declaration, followed by the usual string of text boxes,
labels, etc. all bound to fields. They work.
<asp:FormView ID="FormView1" runat="server" DataKeyNames="RFQID"
DataSourceID="SqlDataSourceRFQ"
onitemcommand="FormView1_ItemCommand"
onitemupdating="FormView1_ItemUpdating"
onmodechanged="FormView1_ModeChanged" Width="100%">
None of the methods do anything special. They just set a couple of
variables. That will be used in later processing, except it never gets to the
later processing. It ends up throwing an exception during the Update.
The fields are all displayed correctly, with the correct data.
The Update button is just the default linkbutton
<asp:LinkButton ID="UpdateButton" runat="server"
CausesValidation="True"
CommandName="Update" Text="Update" />
I notice when I set a breakpoint in the onitemupdate function, I can examing
newvalues, oldvalues, and keys. None of them have any data. They are all
zero length collections.
What happened to the data? What would prevent the data from being sent to
the onitemupdate event handler?
I have a formview object that shows a record and lets users update
fields, and they then press the "update" button, and I want it to update. It
looks like pretty standard stuff, but it doesn't update.
Here's my formview declaration, followed by the usual string of text boxes,
labels, etc. all bound to fields. They work.
<asp:FormView ID="FormView1" runat="server" DataKeyNames="RFQID"
DataSourceID="SqlDataSourceRFQ"
onitemcommand="FormView1_ItemCommand"
onitemupdating="FormView1_ItemUpdating"
onmodechanged="FormView1_ModeChanged" Width="100%">
None of the methods do anything special. They just set a couple of
variables. That will be used in later processing, except it never gets to the
later processing. It ends up throwing an exception during the Update.
The fields are all displayed correctly, with the correct data.
The Update button is just the default linkbutton
<asp:LinkButton ID="UpdateButton" runat="server"
CausesValidation="True"
CommandName="Update" Text="Update" />
I notice when I set a breakpoint in the onitemupdate function, I can examing
newvalues, oldvalues, and keys. None of them have any data. They are all
zero length collections.
What happened to the data? What would prevent the data from being sent to
the onitemupdate event handler?