Any FormView experts out there?
I've been seeing some anomalous behavior with the ASP.NET 2.0 formview control, used with the AccessDataSource control, in the Delete capability.
When I have a DeleteCommand that requires a parameter - an ID for the record to be deleted- which I add in the code-behind like this:
Theoretically, I shouldn't have to specify the Delete Parameter in the .ASPX page like this:
Protected Sub FormView1_ItemDeleting(ByVal sender as object, ETC)
AccessDataSource1.DeleteParameters.Add("IDNumber", TypeCode.Int32, txtIDNum.Text)
Right? I shouldn't have to specify it in the markup because I actually add the whole parameter AND its value in the code-behind.
<asp:Parameter Name="IDNumber" Type="Int32" />
BUT- That's not the behavior I am seeing-- or rather, I am seeing 2 different things: on some pages, I get an error, or the Delete appears to happen but doesn't, unless I add the <DeleteParameters> tag in the markup. In other pages, I get an error, or the Delete appears to happen but doesn't, if I DO add the tag! And the pages are very similar - pulling from the same table in the same Access database.
Is this just another weird Access inconsistency, or is there a reason I'm missing? I would hate to deploy to the client's server and then start getting errors on half the data access pages...
Can anyone shed some light here??
By Lord__Chaos in forum ASP.NET
Last Post: 03-30-2006, 12:51 AM
By drkybelk in forum ASP.NET
Last Post: 01-23-2006, 09:05 AM
By drkybelk in forum .NET
Last Post: 01-19-2006, 05:02 AM
By Jack Vamvas in forum Careers
Last Post: 03-07-2002, 04:25 PM
By Richard Curzon in forum Architecture and Design
Last Post: 06-22-2000, 10:49 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center