|
Custom Cart Fields
|
Previous Top Next |
| FieldName = Quantity (select it from the dropdown box)
|
| FieldType = text
|
| size = 3
|
| CssClass = TextBox2
|
|
|
| FieldName = ID
|
| FieldType = hidden
|
| FieldValue = <%# DataSet1.FieldValue("PartNo", Container) %>
|
|
|
| FieldName = RawCost
|
| FieldType = hidden
|
| FieldValue = <%# DataSet1.FieldValue("Price", Container) %>
|
|
|
| FieldName = Description
|
| FieldType = hidden
|
| FieldValue = <%# DataSet1.FieldValue("Description", Container) %>
|
| FieldName = Color
|
| FieldType = DropDownBox
|
| FirstItemText = Select Color
|
| CssClass = DropBox
|
| DataSource = <%# GetColors(DataSet1.FieldValue("ProductID", Container)) %>
|
| DataTextField = Color
|
| DataValueField = Color
|
|
|
| C#
|
| <script runat="server">
|
| System.Data.DataView GetColors(string ProductID)
|
| {
|
| return new System.Data.DataView(DsColors.DefaultView.Table,
|
| "ProductID=" + ProductID,
|
| "Color",
|
| System.Data.DataViewRowState.CurrentRows);
|
| }
|
| </script>
|
|
|
| VB
|
| <script runat="server">
|
| Function GetColors(ProductID As String) As System.Data.DataView
|
| Return New System.Data.DataView(DsColors.DefaultView.Table, _
|
| "ProductID=" & ProductID, _
|
| "Color", _
|
| System.Data.DataViewRowState.CurrentRows)
|
| End Function
|
| </script>
|
| · | Add the custom "Color" field to this pages cart control.
|
| · | Add a column in cart display table for displaying the Color value and drag the Color field from the Bindings panel into the new column.
|
| · | Add the custom "Color" field to this pages cart control.
|
| · | Add a column in cart display table for displaying the Color value and drag the Color field from the Bindings panel into the new column.
|
| · | Add the custom "Color" field to this pages cart control.
|
| · | Add a column in table for displaying the Color value and define the placeholder in the same manner as the other text based field placeholders.
|