Last post Sep 27, 2011 10:16 PM by Decker Dong - MSFT
Sep 26, 2011 03:52 PM|EddieN1|LINK
When I insert a record, I need to provide some data that isn't shown in the FormVvew. For example, each operator is assigned a department code [EMP_DEPT]. I want to put that department code in the record that is being inserted, however, [DEPT] isn't "bound"
in the FormView. My Insert Command looks like
InsertCommand="INSERT INTO [Cust] ([CUSTNO], [NAME], [DEPT] VALUES (@CUSTNO, @NAME, @DEPT"
Any help is appreciated. Eddie
Sep 27, 2011 08:01 AM|nobdy|LINK
This is simple. You can have custom InsertItemTemplate and ItemTemplate. you can use that to show extra controls in InsertItemTemplate. I hope that helps/
Sep 27, 2011 10:16 PM|Decker Dong - MSFT|LINK
You can also save DEPT in the Session, ViewState or HiddenField——
For the first situation——Just use SessionParameter in the InsertParameters（http://msdn.microsoft.com/en-au/library/system.web.ui.webcontrols.sessionparameter(v=vs.80).aspx）
For the second situation——Please use ControlParameter in the InsertParameters（http://msdn.microsoft.com/en-au/library/system.web.ui.webcontrols.controlparameter(v=vs.80).aspx）。