Solved

Drop Down List throwing a Selected Value which is invalid Error on Edit Item Template

Posted on 2008-06-24
18
915 Views
Last Modified: 2013-11-26
In the Edit Item Template of a FormView I have added a DropDownList that gets its value from another Drop Down List.  However, when the Edit link is clicked I get an Error:

'DropDownList2' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

Obviously there is a value that is not in the list, but I can't figure out how to find it.

I have attached my code for the Edit Item Template

Thanks for your help
<EditItemTemplate>

            orderID:

            <asp:Label ID="orderIDLabel1" runat="server" Text='<%# Eval("orderID") %>' />

            <br />

            <table>

            

            <tr><td align="right"><b>Time Submitted:</b></td>       

            <td><asp:TextBox ID="timeSubmittedtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("timeSubmitted") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Rep Id:</b></td>       

            <td><asp:TextBox ID="repIDtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("repID") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Sales Rep:</b></td>       

            <td><asp:TextBox ID="salesReptxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("salesRep") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Customer:</b></td>       

            <td><asp:TextBox ID="customertxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("customer") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Address:</b></td>       

            <td><asp:TextBox ID="addresstxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("address") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>City, State, Zip:</b></td>       

            <td><asp:TextBox ID="citytxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("cityStateZip") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Contact:</b></td>       

            <td><asp:TextBox ID="contacttxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("contact") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Phone:</b></td>       

            <td><asp:TextBox ID="phonetxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("phone") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">      

            <td><asp:TextBox ID="forecastMachineIdtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("forecastMachineId") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">

            <td><asp:TextBox ID="forecastIdtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("forecastId") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">       

            <td><asp:TextBox ID="forecastModeltxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("forecastModel") %>' 

                                         RunAt="Server" /></td></tr>                                                                                       

            <tr><td align="right"><b>Comments:</b></td>       

            <td><asp:TextBox ID="commentstxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("comments") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Est Delivery Date:</b></td>       

            <td><asp:Calendar 

            

                    ID="dateNeededCalendar" 

                    RunAt="Server" BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Dotted" 

                    ForeColor="WhiteSmoke" 

                    SelectedDate='<%# Bind("neededDate") %>'>

                    <SelectedDayStyle BackColor="#FF9933" ForeColor="Black" />

                    <TitleStyle BackColor="Black" Font-Bold="True" ForeColor="#FF9933" />

                </asp:Calendar>

                    

                    </td></tr>

                    

                    

            <tr><td align="right"><b>Sale Type:</b></td>       

            <td><asp:DropDownList 

                    

                    ID="SaleTypeList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceSaleType"                     

                    DataTextField="saleType" 

                    DataValueField="saleType"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("saleType") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceSaleType" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblSaleType]">

                    </asp:SqlDataSource>

                                        

             </td></tr>

              

            <tr><td align="right"><b>Networking:</b></td>       

            <td><asp:DropDownList 

                    

                    ID="NetworkingList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceNetworking"                     

                    DataTextField="networking" 

                    DataValueField="networking"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("networking") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceNetworking" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblNetworking]">

                    </asp:SqlDataSource>

                                        

             </td></tr>                                

            <tr><td align="right"><b>Stairs:</b></td>       

            <td><asp:DropDownList 

                    

                    ID="StairsList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceStairs"                     

                    DataTextField="stairs" 

                    DataValueField="stairs"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("stairs") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceStairs" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblStairs]">

                    </asp:SqlDataSource>

                                        

             </td></tr>                             

             <tr><td align="right"><b>Stair Count:</b></td>       

             <td><asp:DropDownList 

                    

                    ID="StairCountList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceStairCount"                     

                    DataTextField="stairCount" 

                    DataValueField="stairCount"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("stairCount") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceStairCount" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblStairCount]">

                    </asp:SqlDataSource>

                                        

              </td></tr>                               

              <tr><td align="right"><b>Delivery Method:</b></td>       

             <td><asp:DropDownList 

                    

                    ID="DeliveryMethodList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceDeliveryMethod"                     

                    DataTextField="deliveryMethod" 

                    DataValueField="deliveryMethod"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("deliveryMethod") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceDeliveryMethod" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblDeliveryMethod]">

                    </asp:SqlDataSource>

                                        

               </td></tr> 

               <tr><td align="right"><b>Model:</b></td> 

               <td><asp:DropDownList 

                    

                    ID="ModelList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceModel"                     

                    DataTextField="model" 

                    DataValueField="model"   

                    AutoPostBack="true"                   

                    SelectedValue='<%# Bind("model") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceModel" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblEquipment]">

                    </asp:SqlDataSource>

                                        

              </td></tr>

              

            <tr visible="false">       

            <td><asp:TextBox ID="modelWhseSNtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("modelWhseSN") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">      

            <td><asp:TextBox ID="modelShopSNtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("modelShopSN") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">      

            <td><asp:TextBox ID="modelDelSNtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("modelDelSN") %>' 

                                         RunAt="Server" /></td></tr> 

            

            <tr visible="false">       

            <td><asp:TextBox ID="equipIdtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("equipId") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">       

            <td><asp:TextBox ID="meterShoptxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("meterShop") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">       

            <td><asp:TextBox ID="m6txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m6") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="m7txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m7") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="m8txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m8") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="m3txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m3") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">       

            <td><asp:TextBox ID="m4txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m4") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="m5txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m5") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="meterDeltxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("meterDel") %>' 

                                         RunAt="Server" /></td></tr>                             

                                         

            <tr><td align="right"><b>Accessory:</b></td>       

             <td><%--<asp:DropDownList 

                    

                    ID="DropDownList1" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceAccessories"                     

                    DataTextField="accessory" 

                    DataValueField="accessory"                   

                    SelectedValue='<%# Bind("accessory1") %>' Width="140px" 

                     AutoPostBack="True" >                    

                    

                    </asp:DropDownList>--%>

                    

                    <asp:DropDownList ID="DropDownList2" runat="server" 

                     DataSourceID="SqlDataSourceAccessories" DataTextField="accessory" 

                     DataValueField="accessory" SelectedValue='<%# Bind("accessory1", "{0}") %>' 

                     AutoPostBack="True">

                 </asp:DropDownList>

                    

                    </td></tr> 

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceAccessories" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    

                     

                    SelectCommand="SELECT [accessory] FROM [tblEquipmentAccessory] WHERE ([model] = @model)">

                        <SelectParameters>

                            <asp:ControlParameter ControlID="ModelList" Name="model" 

                                PropertyName="SelectedValue" Type="String" 

                                ConvertEmptyStringToNull="False" DefaultValue="" />

                        </SelectParameters>

                    </asp:SqlDataSource>

                                        

                                                                                                                                                                                                                                                                                                                                                                        

            </table>

Open in new window

0
Comment
Question by:toddpotter
  • 9
  • 9
18 Comments
 
LVL 33

Expert Comment

by:raterus
ID: 21861798
what does the HTML source of the page, specifically the dropdownlist look like when rendered in the browser?
0
 

Author Comment

by:toddpotter
ID: 21864475
Attached is the error that I get.  I can't view the source in the browser because the dropdownlist is in the Edit Item Template and I get the error when I click on edit.
Server Error in '/IMS_Web' Application.

--------------------------------------------------------------------------------
 

'DropDownList2' has a SelectedValue which is invalid because it does not exist in the list of items.

Parameter name: value 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 

Exception Details: System.ArgumentOutOfRangeException: 'DropDownList2' has a SelectedValue which is invalid because it does not exist in the list of items.

Parameter name: value
 

Source Error: 
 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
 

Stack Trace: 
 
 

[ArgumentOutOfRangeException: 'DropDownList2' has a SelectedValue which is invalid because it does not exist in the list of items.

Parameter name: value]

   System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable dataSource) +1826775

   System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +104

   System.Web.UI.WebControls.ListControl.PerformSelect() +31

   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70

   System.Web.UI.Control.DataBindChildren() +204

   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216

   System.Web.UI.Control.DataBind() +12

   System.Web.UI.Control.DataBindChildren() +204

   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216

   System.Web.UI.Control.DataBind() +12

   System.Web.UI.Control.DataBindChildren() +204

   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216

   System.Web.UI.Control.DataBind() +12

   System.Web.UI.Control.DataBindChildren() +204

   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216

   System.Web.UI.WebControls.FormView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +2176

   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +59

   System.Web.UI.WebControls.FormView.PerformDataBinding(IEnumerable data) +9

   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +111

   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29

   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149

   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70

   System.Web.UI.WebControls.FormView.DataBind() +4

   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82

   System.Web.UI.WebControls.FormView.EnsureDataBound() +163

   System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +19

   System.Web.UI.Control.PreRenderRecursiveInternal() +86

   System.Web.UI.Control.PreRenderRecursiveInternal() +170

   System.Web.UI.Control.PreRenderRecursiveInternal() +170

   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
 

 
 
 

--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 

Open in new window

0
 
LVL 33

Expert Comment

by:raterus
ID: 21864920
I'm make really sure whatever "<%# Bind("accessory1", "{0}") %>" is returning an item in the dropdownlist.  Also, how are you binding this list?, or are you not binding it?  As I see it, the dropdownlist will be blank unless you have something going on while the FormView is being bound.  This would certainly throw the above exception since it's not going to create the item for you.
0
 

Author Comment

by:toddpotter
ID: 21865330
Here is what I want to accomplish...maybe I'm going about it the wrong way.

I have a formview control that Displays order information.  When the user clicks Edit, I want them to be able to edit the order.  On the order is a Drop Down List for Equipment which reads an Equipment Table.  Additionally, there are accessories that can be added based on the selection of the equipment (there is a table that holds a one-to-many relationship between Equipment and Accessories...this table is called EquipmentAccessory).  I want the Accessory Drop Down List to poulate based on the model selected.  However, I'm not sure how the formview handles this in edit mode.  The item template holds the current equipment and accessory data in text boxes and then when the Edit function is called the Equipment drop down list needs to be filled with the existing item selected.  The assessory list needs to be poulated as well with only the items that go with that equipment and the previously chosen item needsd to be selected.  

Hope this isn't too confusing.
0
 
LVL 33

Expert Comment

by:raterus
ID: 21865408
Certainly, we usually refer to those scenarios as cascading DropDownLists.  You can search on that more if you'd like, but the general gist of the solution is to set your primary DropDownList autopostback="true", then in the SelectedIndexChanged event, you bind your second list.

When you initially bind the FormView, you need to initially bind your primary list, then take the selected value into account when binding the second list.

Do you have a DataBound even the formview that shows how you are binding these lists in the first place?
0
 

Author Comment

by:toddpotter
ID: 21869096
I added a cascading drop down list but I'm still having problems setting the default value.

I have a formview control that Displays order information in the Item template- there are text boxes that hold the model and accessory information that was previously entered.  

When the user clicks Edit, I want them to be able to edit the models and accessories but default to the values that were previously chosen and limited to the configurations in the database.  I have added the cascading drop down list for my model, but now I need to be able to set the default value that is sitting in the text box on my Item template  .  

I am a beginner so I don't know how or where to pull the value from the textbox on the Item Template and set it as the default in the model drop down list.  
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Order_Entry.aspx.vb" Inherits="Order_Entry" %>
 

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title>Untitled Page</title>

    <style type="text/css">

        #form1

        {

            margin-right: 360px;

        }

        .style1

        {

            width: 100%;

        }

        .style2

        {

            width: 97px;

        }

    </style>

</head>

<body style="background-color: #000000">

    <form id="form1" runat="server">

    <div>

    

        I<asp:ScriptManager ID="ScriptManager1" runat="server">

        </asp:ScriptManager>

        <asp:Label ID="Label1" runat="server" Font-Size="XX-Large" 

            ForeColor="White" style="font-family: AndrewScript; font-size: xx-large; font-weight: 700;" 

            Text="IMS - Order Entry" Height="80px" Width="396px"></asp:Label>

        MS

    

    </div>

    <asp:Label Text='<%# Eval("orderID") %>' runat="server" id="orderIDLabel" />

    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 

        ConflictDetection="CompareAllValues" 

        ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

        DeleteCommand="DELETE FROM [tblOrders_Web] WHERE [orderID] = @original_orderID AND [timeSubmitted] = @original_timeSubmitted AND [repID] = @original_repID AND [salesRep] = @original_salesRep AND [customer] = @original_customer AND [address] = @original_address AND [cityStateZip] = @original_cityStateZip AND [contact] = @original_contact AND [phone] = @original_phone AND [forecastMachineId] = @original_forecastMachineId AND [forecastId] = @original_forecastId AND [forecastModel] = @original_forecastModel AND [comments] = @original_comments AND [neededDate] = @original_neededDate AND [saleType] = @original_saleType AND [networking] = @original_networking AND [stairs] = @original_stairs AND [stairCount] = @original_stairCount AND [deliveryMethod] = @original_deliveryMethod AND [model] = @original_model AND [modelWhseSN] = @original_modelWhseSN AND [modelShopSN] = @original_modelShopSN AND [modelDelSN] = @original_modelDelSN AND [equipId] = @original_equipId AND [meterShop] = @original_meterShop AND [m6] = @original_m6 AND [m7] = @original_m7 AND [m8] = @original_m8 AND [m3] = @original_m3 AND [m4] = @original_m4 AND [m5] = @original_m5 AND [meterDel] = @original_meterDel AND [accessory1] = @original_accessory1 AND [a1WhseSN] = @original_a1WhseSN AND [a1ShopSN] = @original_a1ShopSN AND [a1DelSN] = @original_a1DelSN AND [accessory2] = @original_accessory2 AND [a2WhseSN] = @original_a2WhseSN AND [a2ShopSN] = @original_a2ShopSN AND [a2DelSN] = @original_a2DelSN AND [accessory3] = @original_accessory3 AND [a3WhseSN] = @original_a3WhseSN AND [a3ShopSN] = @original_a3ShopSN AND [a3DelSN] = @original_a3DelSN AND [accessory4] = @original_accessory4 AND [a4WhseSN] = @original_a4WhseSN AND [a4ShopSN] = @original_a4ShopSN AND [a4DelSN] = @original_a4DelSN AND [accessory5] = @original_accessory5 AND [a5WhseSN] = @original_a5WhseSN AND [a5ShopSN] = @original_a5ShopSN AND [a5DelSN] = @original_a5DelSN AND [accessory6] = @original_accessory6 AND [a6WhseSN] = @original_a6WhseSN AND [a6ShopSN] = @original_a6ShopSN AND [a6DelSN] = @original_a6DelSN AND [accessory7] = @original_accessory7 AND [a7WhseSN] = @original_a7WhseSN AND [a7ShopSN] = @original_a7ShopSN AND [a7DelSN] = @original_a7DelSN AND [accessory8] = @original_accessory8 AND [a8WhseSN] = @original_a8WhseSN AND [a8ShopSN] = @original_a8ShopSN AND [a8DelSN] = @original_a8DelSN AND [accessory9] = @original_accessory9 AND [a9WhseSN] = @original_a9WhseSN AND [a9ShopSN] = @original_a9ShopSN AND [a9DelSN] = @original_a9DelSN AND [accessory10] = @original_accessory10 AND [a10WhseSN] = @original_a10WhseSN AND [a10ShopSN] = @original_a10ShopSN AND [a10DelSN] = @original_a10DelSN AND [accessory11] = @original_accessory11 AND [a11WhseSN] = @original_a11WhseSN AND [a11ShopSN] = @original_a11ShopSN AND [a11DelSN] = @original_a11DelSN AND [accessory12] = @original_accessory12 AND [a12WhseSN] = @original_a12WhseSN AND [a12ShopSN] = @original_a12ShopSN AND [a12DelSN] = @original_a12DelSN AND [accessory13] = @original_accessory13 AND [a13WhseSN] = @original_a13WhseSN AND [a13ShopSN] = @original_a13ShopSN AND [a13DelSN] = @original_a13DelSN AND [accessory14] = @original_accessory14 AND [a14WhseSN] = @original_a14WhseSN AND [a14ShopSN] = @original_a14ShopSN AND [a14DelSN] = @original_a14DelSN AND [estDelTime] = @original_estDelTime AND [placement] = @original_placement AND [m1] = @original_m1 AND [m2] = @original_m2" 

        InsertCommand="INSERT INTO [tblOrders_Web] ([timeSubmitted], [repID], [salesRep], [customer], [address], [cityStateZip], [contact], [phone], [forecastMachineId], [forecastId], [forecastModel], [comments], [neededDate], [saleType], [networking], [stairs], [stairCount], [deliveryMethod], [model], [modelWhseSN], [modelShopSN], [modelDelSN], [equipId], [meterShop], [m6], [m7], [m8], [m3], [m4], [m5], [meterDel], [accessory1], [a1WhseSN], [a1ShopSN], [a1DelSN], [accessory2], [a2WhseSN], [a2ShopSN], [a2DelSN], [accessory3], [a3WhseSN], [a3ShopSN], [a3DelSN], [accessory4], [a4WhseSN], [a4ShopSN], [a4DelSN], [accessory5], [a5WhseSN], [a5ShopSN], [a5DelSN], [accessory6], [a6WhseSN], [a6ShopSN], [a6DelSN], [accessory7], [a7WhseSN], [a7ShopSN], [a7DelSN], [accessory8], [a8WhseSN], [a8ShopSN], [a8DelSN], [accessory9], [a9WhseSN], [a9ShopSN], [a9DelSN], [accessory10], [a10WhseSN], [a10ShopSN], [a10DelSN], [accessory11], [a11WhseSN], [a11ShopSN], [a11DelSN], [accessory12], [a12WhseSN], [a12ShopSN], [a12DelSN], [accessory13], [a13WhseSN], [a13ShopSN], [a13DelSN], [accessory14], [a14WhseSN], [a14ShopSN], [a14DelSN], [estDelTime], [placement], [m1], [m2]) VALUES (@timeSubmitted, @repID, @salesRep, @customer, @address, @cityStateZip, @contact, @phone, @forecastMachineId, @forecastId, @forecastModel, @comments, @neededDate, @saleType, @networking, @stairs, @stairCount, @deliveryMethod, @model, @modelWhseSN, @modelShopSN, @modelDelSN, @equipId, @meterShop, @m6, @m7, @m8, @m3, @m4, @m5, @meterDel, @accessory1, @a1WhseSN, @a1ShopSN, @a1DelSN, @accessory2, @a2WhseSN, @a2ShopSN, @a2DelSN, @accessory3, @a3WhseSN, @a3ShopSN, @a3DelSN, @accessory4, @a4WhseSN, @a4ShopSN, @a4DelSN, @accessory5, @a5WhseSN, @a5ShopSN, @a5DelSN, @accessory6, @a6WhseSN, @a6ShopSN, @a6DelSN, @accessory7, @a7WhseSN, @a7ShopSN, @a7DelSN, @accessory8, @a8WhseSN, @a8ShopSN, @a8DelSN, @accessory9, @a9WhseSN, @a9ShopSN, @a9DelSN, @accessory10, @a10WhseSN, @a10ShopSN, @a10DelSN, @accessory11, @a11WhseSN, @a11ShopSN, @a11DelSN, @accessory12, @a12WhseSN, @a12ShopSN, @a12DelSN, @accessory13, @a13WhseSN, @a13ShopSN, @a13DelSN, @accessory14, @a14WhseSN, @a14ShopSN, @a14DelSN, @estDelTime, @placement, @m1, @m2)" 

        OldValuesParameterFormatString="original_{0}" 

        SelectCommand="SELECT * FROM [tblOrders_Web]" 

        UpdateCommand="UPDATE [tblOrders_Web] SET [timeSubmitted] = @timeSubmitted, [repID] = @repID, [salesRep] = @salesRep, [customer] = @customer, [address] = @address, [cityStateZip] = @cityStateZip, [contact] = @contact, [phone] = @phone, [forecastMachineId] = @forecastMachineId, [forecastId] = @forecastId, [forecastModel] = @forecastModel, [comments] = @comments, [neededDate] = @neededDate, [saleType] = @saleType, [networking] = @networking, [stairs] = @stairs, [stairCount] = @stairCount, [deliveryMethod] = @deliveryMethod, [model] = @model, [modelWhseSN] = @modelWhseSN, [modelShopSN] = @modelShopSN, [modelDelSN] = @modelDelSN, [equipId] = @equipId, [meterShop] = @meterShop, [m6] = @m6, [m7] = @m7, [m8] = @m8, [m3] = @m3, [m4] = @m4, [m5] = @m5, [meterDel] = @meterDel, [accessory1] = @accessory1, [a1WhseSN] = @a1WhseSN, [a1ShopSN] = @a1ShopSN, [a1DelSN] = @a1DelSN, [accessory2] = @accessory2, [a2WhseSN] = @a2WhseSN, [a2ShopSN] = @a2ShopSN, [a2DelSN] = @a2DelSN, [accessory3] = @accessory3, [a3WhseSN] = @a3WhseSN, [a3ShopSN] = @a3ShopSN, [a3DelSN] = @a3DelSN, [accessory4] = @accessory4, [a4WhseSN] = @a4WhseSN, [a4ShopSN] = @a4ShopSN, [a4DelSN] = @a4DelSN, [accessory5] = @accessory5, [a5WhseSN] = @a5WhseSN, [a5ShopSN] = @a5ShopSN, [a5DelSN] = @a5DelSN, [accessory6] = @accessory6, [a6WhseSN] = @a6WhseSN, [a6ShopSN] = @a6ShopSN, [a6DelSN] = @a6DelSN, [accessory7] = @accessory7, [a7WhseSN] = @a7WhseSN, [a7ShopSN] = @a7ShopSN, [a7DelSN] = @a7DelSN, [accessory8] = @accessory8, [a8WhseSN] = @a8WhseSN, [a8ShopSN] = @a8ShopSN, [a8DelSN] = @a8DelSN, [accessory9] = @accessory9, [a9WhseSN] = @a9WhseSN, [a9ShopSN] = @a9ShopSN, [a9DelSN] = @a9DelSN, [accessory10] = @accessory10, [a10WhseSN] = @a10WhseSN, [a10ShopSN] = @a10ShopSN, [a10DelSN] = @a10DelSN, [accessory11] = @accessory11, [a11WhseSN] = @a11WhseSN, [a11ShopSN] = @a11ShopSN, [a11DelSN] = @a11DelSN, [accessory12] = @accessory12, [a12WhseSN] = @a12WhseSN, [a12ShopSN] = @a12ShopSN, [a12DelSN] = @a12DelSN, [accessory13] = @accessory13, [a13WhseSN] = @a13WhseSN, [a13ShopSN] = @a13ShopSN, [a13DelSN] = @a13DelSN, [accessory14] = @accessory14, [a14WhseSN] = @a14WhseSN, [a14ShopSN] = @a14ShopSN, [a14DelSN] = @a14DelSN, [estDelTime] = @estDelTime, [placement] = @placement, [m1] = @m1, [m2] = @m2 WHERE [orderID] = @original_orderID AND [timeSubmitted] = @original_timeSubmitted AND [repID] = @original_repID AND [salesRep] = @original_salesRep AND [customer] = @original_customer AND [address] = @original_address AND [cityStateZip] = @original_cityStateZip AND [contact] = @original_contact AND [phone] = @original_phone AND [forecastMachineId] = @original_forecastMachineId AND [forecastId] = @original_forecastId AND [forecastModel] = @original_forecastModel AND [comments] = @original_comments AND [neededDate] = @original_neededDate AND [saleType] = @original_saleType AND [networking] = @original_networking AND [stairs] = @original_stairs AND [stairCount] = @original_stairCount AND [deliveryMethod] = @original_deliveryMethod AND [model] = @original_model AND [modelWhseSN] = @original_modelWhseSN AND [modelShopSN] = @original_modelShopSN AND [modelDelSN] = @original_modelDelSN AND [equipId] = @original_equipId AND [meterShop] = @original_meterShop AND [m6] = @original_m6 AND [m7] = @original_m7 AND [m8] = @original_m8 AND [m3] = @original_m3 AND [m4] = @original_m4 AND [m5] = @original_m5 AND [meterDel] = @original_meterDel AND [accessory1] = @original_accessory1 AND [a1WhseSN] = @original_a1WhseSN AND [a1ShopSN] = @original_a1ShopSN AND [a1DelSN] = @original_a1DelSN AND [accessory2] = @original_accessory2 AND [a2WhseSN] = @original_a2WhseSN AND [a2ShopSN] = @original_a2ShopSN AND [a2DelSN] = @original_a2DelSN AND [accessory3] = @original_accessory3 AND [a3WhseSN] = @original_a3WhseSN AND [a3ShopSN] = @original_a3ShopSN AND [a3DelSN] = @original_a3DelSN AND [accessory4] = @original_accessory4 AND [a4WhseSN] = @original_a4WhseSN AND [a4ShopSN] = @original_a4ShopSN AND [a4DelSN] = @original_a4DelSN AND [accessory5] = @original_accessory5 AND [a5WhseSN] = @original_a5WhseSN AND [a5ShopSN] = @original_a5ShopSN AND [a5DelSN] = @original_a5DelSN AND [accessory6] = @original_accessory6 AND [a6WhseSN] = @original_a6WhseSN AND [a6ShopSN] = @original_a6ShopSN AND [a6DelSN] = @original_a6DelSN AND [accessory7] = @original_accessory7 AND [a7WhseSN] = @original_a7WhseSN AND [a7ShopSN] = @original_a7ShopSN AND [a7DelSN] = @original_a7DelSN AND [accessory8] = @original_accessory8 AND [a8WhseSN] = @original_a8WhseSN AND [a8ShopSN] = @original_a8ShopSN AND [a8DelSN] = @original_a8DelSN AND [accessory9] = @original_accessory9 AND [a9WhseSN] = @original_a9WhseSN AND [a9ShopSN] = @original_a9ShopSN AND [a9DelSN] = @original_a9DelSN AND [accessory10] = @original_accessory10 AND [a10WhseSN] = @original_a10WhseSN AND [a10ShopSN] = @original_a10ShopSN AND [a10DelSN] = @original_a10DelSN AND [accessory11] = @original_accessory11 AND [a11WhseSN] = @original_a11WhseSN AND [a11ShopSN] = @original_a11ShopSN AND [a11DelSN] = @original_a11DelSN AND [accessory12] = @original_accessory12 AND [a12WhseSN] = @original_a12WhseSN AND [a12ShopSN] = @original_a12ShopSN AND [a12DelSN] = @original_a12DelSN AND [accessory13] = @original_accessory13 AND [a13WhseSN] = @original_a13WhseSN AND [a13ShopSN] = @original_a13ShopSN AND [a13DelSN] = @original_a13DelSN AND [accessory14] = @original_accessory14 AND [a14WhseSN] = @original_a14WhseSN AND [a14ShopSN] = @original_a14ShopSN AND [a14DelSN] = @original_a14DelSN AND [estDelTime] = @original_estDelTime AND [placement] = @original_placement AND [m1] = @original_m1 AND [m2] = @original_m2">

        <DeleteParameters>

            <asp:Parameter Name="original_orderID" Type="Int16" />

            <asp:Parameter Name="original_timeSubmitted" Type="String" />

            <asp:Parameter Name="original_repID" Type="Int16" />

            <asp:Parameter Name="original_salesRep" Type="String" />

            <asp:Parameter Name="original_customer" Type="String" />

            <asp:Parameter Name="original_address" Type="String" />

            <asp:Parameter Name="original_cityStateZip" Type="String" />

            <asp:Parameter Name="original_contact" Type="String" />

            <asp:Parameter Name="original_phone" Type="String" />

            <asp:Parameter Name="original_forecastMachineId" Type="String" />

            <asp:Parameter Name="original_forecastId" Type="String" />

            <asp:Parameter Name="original_forecastModel" Type="String" />

            <asp:Parameter Name="original_comments" Type="String" />

            <asp:Parameter Name="original_neededDate" Type="DateTime" />

            <asp:Parameter Name="original_saleType" Type="String" />

            <asp:Parameter Name="original_networking" Type="String" />

            <asp:Parameter Name="original_stairs" Type="String" />

            <asp:Parameter Name="original_stairCount" Type="Int16" />

            <asp:Parameter Name="original_deliveryMethod" Type="String" />

            <asp:Parameter Name="original_model" Type="String" />

            <asp:Parameter Name="original_modelWhseSN" Type="String" />

            <asp:Parameter Name="original_modelShopSN" Type="String" />

            <asp:Parameter Name="original_modelDelSN" Type="String" />

            <asp:Parameter Name="original_equipId" Type="String" />

            <asp:Parameter Name="original_meterShop" Type="String" />

            <asp:Parameter Name="original_m6" Type="String" />

            <asp:Parameter Name="original_m7" Type="String" />

            <asp:Parameter Name="original_m8" Type="String" />

            <asp:Parameter Name="original_m3" Type="String" />

            <asp:Parameter Name="original_m4" Type="String" />

            <asp:Parameter Name="original_m5" Type="String" />

            <asp:Parameter Name="original_meterDel" Type="String" />

            <asp:Parameter Name="original_accessory1" Type="String" />

            <asp:Parameter Name="original_a1WhseSN" Type="String" />

            <asp:Parameter Name="original_a1ShopSN" Type="String" />

            <asp:Parameter Name="original_a1DelSN" Type="String" />

            <asp:Parameter Name="original_accessory2" Type="String" />

            <asp:Parameter Name="original_a2WhseSN" Type="String" />

            <asp:Parameter Name="original_a2ShopSN" Type="String" />

            <asp:Parameter Name="original_a2DelSN" Type="String" />

            <asp:Parameter Name="original_accessory3" Type="String" />

            <asp:Parameter Name="original_a3WhseSN" Type="String" />

            <asp:Parameter Name="original_a3ShopSN" Type="String" />

            <asp:Parameter Name="original_a3DelSN" Type="String" />

            <asp:Parameter Name="original_accessory4" Type="String" />

            <asp:Parameter Name="original_a4WhseSN" Type="String" />

            <asp:Parameter Name="original_a4ShopSN" Type="String" />

            <asp:Parameter Name="original_a4DelSN" Type="String" />

            <asp:Parameter Name="original_accessory5" Type="String" />

            <asp:Parameter Name="original_a5WhseSN" Type="String" />

            <asp:Parameter Name="original_a5ShopSN" Type="String" />

            <asp:Parameter Name="original_a5DelSN" Type="String" />

            <asp:Parameter Name="original_accessory6" Type="String" />

            <asp:Parameter Name="original_a6WhseSN" Type="String" />

            <asp:Parameter Name="original_a6ShopSN" Type="String" />

            <asp:Parameter Name="original_a6DelSN" Type="String" />

            <asp:Parameter Name="original_accessory7" Type="String" />

            <asp:Parameter Name="original_a7WhseSN" Type="String" />

            <asp:Parameter Name="original_a7ShopSN" Type="String" />

            <asp:Parameter Name="original_a7DelSN" Type="String" />

            <asp:Parameter Name="original_accessory8" Type="String" />

            <asp:Parameter Name="original_a8WhseSN" Type="String" />

            <asp:Parameter Name="original_a8ShopSN" Type="String" />

            <asp:Parameter Name="original_a8DelSN" Type="String" />

            <asp:Parameter Name="original_accessory9" Type="String" />

            <asp:Parameter Name="original_a9WhseSN" Type="String" />

            <asp:Parameter Name="original_a9ShopSN" Type="String" />

            <asp:Parameter Name="original_a9DelSN" Type="String" />

            <asp:Parameter Name="original_accessory10" Type="String" />

            <asp:Parameter Name="original_a10WhseSN" Type="String" />

            <asp:Parameter Name="original_a10ShopSN" Type="String" />

            <asp:Parameter Name="original_a10DelSN" Type="String" />

            <asp:Parameter Name="original_accessory11" Type="String" />

            <asp:Parameter Name="original_a11WhseSN" Type="String" />

            <asp:Parameter Name="original_a11ShopSN" Type="String" />

            <asp:Parameter Name="original_a11DelSN" Type="String" />

            <asp:Parameter Name="original_accessory12" Type="String" />

            <asp:Parameter Name="original_a12WhseSN" Type="String" />

            <asp:Parameter Name="original_a12ShopSN" Type="String" />

            <asp:Parameter Name="original_a12DelSN" Type="String" />

            <asp:Parameter Name="original_accessory13" Type="String" />

            <asp:Parameter Name="original_a13WhseSN" Type="String" />

            <asp:Parameter Name="original_a13ShopSN" Type="String" />

            <asp:Parameter Name="original_a13DelSN" Type="String" />

            <asp:Parameter Name="original_accessory14" Type="String" />

            <asp:Parameter Name="original_a14WhseSN" Type="String" />

            <asp:Parameter Name="original_a14ShopSN" Type="String" />

            <asp:Parameter Name="original_a14DelSN" Type="String" />

            <asp:Parameter Name="original_estDelTime" Type="String" />

            <asp:Parameter Name="original_placement" Type="Int32" />

            <asp:Parameter Name="original_m1" Type="String" />

            <asp:Parameter Name="original_m2" Type="String" />

        </DeleteParameters>

        <UpdateParameters>

            <asp:Parameter Name="timeSubmitted" Type="String" />

            <asp:Parameter Name="repID" Type="Int16" />

            <asp:Parameter Name="salesRep" Type="String" />

            <asp:Parameter Name="customer" Type="String" />

            <asp:Parameter Name="address" Type="String" />

            <asp:Parameter Name="cityStateZip" Type="String" />

            <asp:Parameter Name="contact" Type="String" />

            <asp:Parameter Name="phone" Type="String" />

            <asp:Parameter Name="forecastMachineId" Type="String" />

            <asp:Parameter Name="forecastId" Type="String" />

            <asp:Parameter Name="forecastModel" Type="String" />

            <asp:Parameter Name="comments" Type="String" />

            <asp:Parameter Name="neededDate" Type="DateTime" />

            <asp:Parameter Name="saleType" Type="String" />

            <asp:Parameter Name="networking" Type="String" />

            <asp:Parameter Name="stairs" Type="String" />

            <asp:Parameter Name="stairCount" Type="Int16" />

            <asp:Parameter Name="deliveryMethod" Type="String" />

            <asp:Parameter Name="model" Type="String" />

            <asp:Parameter Name="modelWhseSN" Type="String" />

            <asp:Parameter Name="modelShopSN" Type="String" />

            <asp:Parameter Name="modelDelSN" Type="String" />

            <asp:Parameter Name="equipId" Type="String" />

            <asp:Parameter Name="meterShop" Type="String" />

            <asp:Parameter Name="m6" Type="String" />

            <asp:Parameter Name="m7" Type="String" />

            <asp:Parameter Name="m8" Type="String" />

            <asp:Parameter Name="m3" Type="String" />

            <asp:Parameter Name="m4" Type="String" />

            <asp:Parameter Name="m5" Type="String" />

            <asp:Parameter Name="meterDel" Type="String" />

            <asp:Parameter Name="accessory1" Type="String" />

            <asp:Parameter Name="a1WhseSN" Type="String" />

            <asp:Parameter Name="a1ShopSN" Type="String" />

            <asp:Parameter Name="a1DelSN" Type="String" />

            <asp:Parameter Name="accessory2" Type="String" />

            <asp:Parameter Name="a2WhseSN" Type="String" />

            <asp:Parameter Name="a2ShopSN" Type="String" />

            <asp:Parameter Name="a2DelSN" Type="String" />

            <asp:Parameter Name="accessory3" Type="String" />

            <asp:Parameter Name="a3WhseSN" Type="String" />

            <asp:Parameter Name="a3ShopSN" Type="String" />

            <asp:Parameter Name="a3DelSN" Type="String" />

            <asp:Parameter Name="accessory4" Type="String" />

            <asp:Parameter Name="a4WhseSN" Type="String" />

            <asp:Parameter Name="a4ShopSN" Type="String" />

            <asp:Parameter Name="a4DelSN" Type="String" />

            <asp:Parameter Name="accessory5" Type="String" />

            <asp:Parameter Name="a5WhseSN" Type="String" />

            <asp:Parameter Name="a5ShopSN" Type="String" />

            <asp:Parameter Name="a5DelSN" Type="String" />

            <asp:Parameter Name="accessory6" Type="String" />

            <asp:Parameter Name="a6WhseSN" Type="String" />

            <asp:Parameter Name="a6ShopSN" Type="String" />

            <asp:Parameter Name="a6DelSN" Type="String" />

            <asp:Parameter Name="accessory7" Type="String" />

            <asp:Parameter Name="a7WhseSN" Type="String" />

            <asp:Parameter Name="a7ShopSN" Type="String" />

            <asp:Parameter Name="a7DelSN" Type="String" />

            <asp:Parameter Name="accessory8" Type="String" />

            <asp:Parameter Name="a8WhseSN" Type="String" />

            <asp:Parameter Name="a8ShopSN" Type="String" />

            <asp:Parameter Name="a8DelSN" Type="String" />

            <asp:Parameter Name="accessory9" Type="String" />

            <asp:Parameter Name="a9WhseSN" Type="String" />

            <asp:Parameter Name="a9ShopSN" Type="String" />

            <asp:Parameter Name="a9DelSN" Type="String" />

            <asp:Parameter Name="accessory10" Type="String" />

            <asp:Parameter Name="a10WhseSN" Type="String" />

            <asp:Parameter Name="a10ShopSN" Type="String" />

            <asp:Parameter Name="a10DelSN" Type="String" />

            <asp:Parameter Name="accessory11" Type="String" />

            <asp:Parameter Name="a11WhseSN" Type="String" />

            <asp:Parameter Name="a11ShopSN" Type="String" />

            <asp:Parameter Name="a11DelSN" Type="String" />

            <asp:Parameter Name="accessory12" Type="String" />

            <asp:Parameter Name="a12WhseSN" Type="String" />

            <asp:Parameter Name="a12ShopSN" Type="String" />

            <asp:Parameter Name="a12DelSN" Type="String" />

            <asp:Parameter Name="accessory13" Type="String" />

            <asp:Parameter Name="a13WhseSN" Type="String" />

            <asp:Parameter Name="a13ShopSN" Type="String" />

            <asp:Parameter Name="a13DelSN" Type="String" />

            <asp:Parameter Name="accessory14" Type="String" />

            <asp:Parameter Name="a14WhseSN" Type="String" />

            <asp:Parameter Name="a14ShopSN" Type="String" />

            <asp:Parameter Name="a14DelSN" Type="String" />

            <asp:Parameter Name="estDelTime" Type="String" />

            <asp:Parameter Name="placement" Type="Int32" />

            <asp:Parameter Name="m1" Type="String" />

            <asp:Parameter Name="m2" Type="String" />

            <asp:Parameter Name="original_orderID" Type="Int16" />

            <asp:Parameter Name="original_timeSubmitted" Type="String" />

            <asp:Parameter Name="original_repID" Type="Int16" />

            <asp:Parameter Name="original_salesRep" Type="String" />

            <asp:Parameter Name="original_customer" Type="String" />

            <asp:Parameter Name="original_address" Type="String" />

            <asp:Parameter Name="original_cityStateZip" Type="String" />

            <asp:Parameter Name="original_contact" Type="String" />

            <asp:Parameter Name="original_phone" Type="String" />

            <asp:Parameter Name="original_forecastMachineId" Type="String" />

            <asp:Parameter Name="original_forecastId" Type="String" />

            <asp:Parameter Name="original_forecastModel" Type="String" />

            <asp:Parameter Name="original_comments" Type="String" />

            <asp:Parameter Name="original_neededDate" Type="DateTime" />

            <asp:Parameter Name="original_saleType" Type="String" />

            <asp:Parameter Name="original_networking" Type="String" />

            <asp:Parameter Name="original_stairs" Type="String" />

            <asp:Parameter Name="original_stairCount" Type="Int16" />

            <asp:Parameter Name="original_deliveryMethod" Type="String" />

            <asp:Parameter Name="original_model" Type="String" />

            <asp:Parameter Name="original_modelWhseSN" Type="String" />

            <asp:Parameter Name="original_modelShopSN" Type="String" />

            <asp:Parameter Name="original_modelDelSN" Type="String" />

            <asp:Parameter Name="original_equipId" Type="String" />

            <asp:Parameter Name="original_meterShop" Type="String" />

            <asp:Parameter Name="original_m6" Type="String" />

            <asp:Parameter Name="original_m7" Type="String" />

            <asp:Parameter Name="original_m8" Type="String" />

            <asp:Parameter Name="original_m3" Type="String" />

            <asp:Parameter Name="original_m4" Type="String" />

            <asp:Parameter Name="original_m5" Type="String" />

            <asp:Parameter Name="original_meterDel" Type="String" />

            <asp:Parameter Name="original_accessory1" Type="String" />

            <asp:Parameter Name="original_a1WhseSN" Type="String" />

            <asp:Parameter Name="original_a1ShopSN" Type="String" />

            <asp:Parameter Name="original_a1DelSN" Type="String" />

            <asp:Parameter Name="original_accessory2" Type="String" />

            <asp:Parameter Name="original_a2WhseSN" Type="String" />

            <asp:Parameter Name="original_a2ShopSN" Type="String" />

            <asp:Parameter Name="original_a2DelSN" Type="String" />

            <asp:Parameter Name="original_accessory3" Type="String" />

            <asp:Parameter Name="original_a3WhseSN" Type="String" />

            <asp:Parameter Name="original_a3ShopSN" Type="String" />

            <asp:Parameter Name="original_a3DelSN" Type="String" />

            <asp:Parameter Name="original_accessory4" Type="String" />

            <asp:Parameter Name="original_a4WhseSN" Type="String" />

            <asp:Parameter Name="original_a4ShopSN" Type="String" />

            <asp:Parameter Name="original_a4DelSN" Type="String" />

            <asp:Parameter Name="original_accessory5" Type="String" />

            <asp:Parameter Name="original_a5WhseSN" Type="String" />

            <asp:Parameter Name="original_a5ShopSN" Type="String" />

            <asp:Parameter Name="original_a5DelSN" Type="String" />

            <asp:Parameter Name="original_accessory6" Type="String" />

            <asp:Parameter Name="original_a6WhseSN" Type="String" />

            <asp:Parameter Name="original_a6ShopSN" Type="String" />

            <asp:Parameter Name="original_a6DelSN" Type="String" />

            <asp:Parameter Name="original_accessory7" Type="String" />

            <asp:Parameter Name="original_a7WhseSN" Type="String" />

            <asp:Parameter Name="original_a7ShopSN" Type="String" />

            <asp:Parameter Name="original_a7DelSN" Type="String" />

            <asp:Parameter Name="original_accessory8" Type="String" />

            <asp:Parameter Name="original_a8WhseSN" Type="String" />

            <asp:Parameter Name="original_a8ShopSN" Type="String" />

            <asp:Parameter Name="original_a8DelSN" Type="String" />

            <asp:Parameter Name="original_accessory9" Type="String" />

            <asp:Parameter Name="original_a9WhseSN" Type="String" />

            <asp:Parameter Name="original_a9ShopSN" Type="String" />

            <asp:Parameter Name="original_a9DelSN" Type="String" />

            <asp:Parameter Name="original_accessory10" Type="String" />

            <asp:Parameter Name="original_a10WhseSN" Type="String" />

            <asp:Parameter Name="original_a10ShopSN" Type="String" />

            <asp:Parameter Name="original_a10DelSN" Type="String" />

            <asp:Parameter Name="original_accessory11" Type="String" />

            <asp:Parameter Name="original_a11WhseSN" Type="String" />

            <asp:Parameter Name="original_a11ShopSN" Type="String" />

            <asp:Parameter Name="original_a11DelSN" Type="String" />

            <asp:Parameter Name="original_accessory12" Type="String" />

            <asp:Parameter Name="original_a12WhseSN" Type="String" />

            <asp:Parameter Name="original_a12ShopSN" Type="String" />

            <asp:Parameter Name="original_a12DelSN" Type="String" />

            <asp:Parameter Name="original_accessory13" Type="String" />

            <asp:Parameter Name="original_a13WhseSN" Type="String" />

            <asp:Parameter Name="original_a13ShopSN" Type="String" />

            <asp:Parameter Name="original_a13DelSN" Type="String" />

            <asp:Parameter Name="original_accessory14" Type="String" />

            <asp:Parameter Name="original_a14WhseSN" Type="String" />

            <asp:Parameter Name="original_a14ShopSN" Type="String" />

            <asp:Parameter Name="original_a14DelSN" Type="String" />

            <asp:Parameter Name="original_estDelTime" Type="String" />

            <asp:Parameter Name="original_placement" Type="Int32" />

            <asp:Parameter Name="original_m1" Type="String" />

            <asp:Parameter Name="original_m2" Type="String" />

        </UpdateParameters>

        <InsertParameters>

            <asp:Parameter Name="timeSubmitted" Type="String" />

            <asp:Parameter Name="repID" Type="Int16" />

            <asp:Parameter Name="salesRep" Type="String" />

            <asp:Parameter Name="customer" Type="String" />

            <asp:Parameter Name="address" Type="String" />

            <asp:Parameter Name="cityStateZip" Type="String" />

            <asp:Parameter Name="contact" Type="String" />

            <asp:Parameter Name="phone" Type="String" />

            <asp:Parameter Name="forecastMachineId" Type="String" />

            <asp:Parameter Name="forecastId" Type="String" />

            <asp:Parameter Name="forecastModel" Type="String" />

            <asp:Parameter Name="comments" Type="String" />

            <asp:Parameter Name="neededDate" Type="DateTime" />

            <asp:Parameter Name="saleType" Type="String" />

            <asp:Parameter Name="networking" Type="String" />

            <asp:Parameter Name="stairs" Type="String" />

            <asp:Parameter Name="stairCount" Type="Int16" />

            <asp:Parameter Name="deliveryMethod" Type="String" />

            <asp:Parameter Name="model" Type="String" />

            <asp:Parameter Name="modelWhseSN" Type="String" />

            <asp:Parameter Name="modelShopSN" Type="String" />

            <asp:Parameter Name="modelDelSN" Type="String" />

            <asp:Parameter Name="equipId" Type="String" />

            <asp:Parameter Name="meterShop" Type="String" />

            <asp:Parameter Name="m6" Type="String" />

            <asp:Parameter Name="m7" Type="String" />

            <asp:Parameter Name="m8" Type="String" />

            <asp:Parameter Name="m3" Type="String" />

            <asp:Parameter Name="m4" Type="String" />

            <asp:Parameter Name="m5" Type="String" />

            <asp:Parameter Name="meterDel" Type="String" />

            <asp:Parameter Name="accessory1" Type="String" />

            <asp:Parameter Name="a1WhseSN" Type="String" />

            <asp:Parameter Name="a1ShopSN" Type="String" />

            <asp:Parameter Name="a1DelSN" Type="String" />

            <asp:Parameter Name="accessory2" Type="String" />

            <asp:Parameter Name="a2WhseSN" Type="String" />

            <asp:Parameter Name="a2ShopSN" Type="String" />

            <asp:Parameter Name="a2DelSN" Type="String" />

            <asp:Parameter Name="accessory3" Type="String" />

            <asp:Parameter Name="a3WhseSN" Type="String" />

            <asp:Parameter Name="a3ShopSN" Type="String" />

            <asp:Parameter Name="a3DelSN" Type="String" />

            <asp:Parameter Name="accessory4" Type="String" />

            <asp:Parameter Name="a4WhseSN" Type="String" />

            <asp:Parameter Name="a4ShopSN" Type="String" />

            <asp:Parameter Name="a4DelSN" Type="String" />

            <asp:Parameter Name="accessory5" Type="String" />

            <asp:Parameter Name="a5WhseSN" Type="String" />

            <asp:Parameter Name="a5ShopSN" Type="String" />

            <asp:Parameter Name="a5DelSN" Type="String" />

            <asp:Parameter Name="accessory6" Type="String" />

            <asp:Parameter Name="a6WhseSN" Type="String" />

            <asp:Parameter Name="a6ShopSN" Type="String" />

            <asp:Parameter Name="a6DelSN" Type="String" />

            <asp:Parameter Name="accessory7" Type="String" />

            <asp:Parameter Name="a7WhseSN" Type="String" />

            <asp:Parameter Name="a7ShopSN" Type="String" />

            <asp:Parameter Name="a7DelSN" Type="String" />

            <asp:Parameter Name="accessory8" Type="String" />

            <asp:Parameter Name="a8WhseSN" Type="String" />

            <asp:Parameter Name="a8ShopSN" Type="String" />

            <asp:Parameter Name="a8DelSN" Type="String" />

            <asp:Parameter Name="accessory9" Type="String" />

            <asp:Parameter Name="a9WhseSN" Type="String" />

            <asp:Parameter Name="a9ShopSN" Type="String" />

            <asp:Parameter Name="a9DelSN" Type="String" />

            <asp:Parameter Name="accessory10" Type="String" />

            <asp:Parameter Name="a10WhseSN" Type="String" />

            <asp:Parameter Name="a10ShopSN" Type="String" />

            <asp:Parameter Name="a10DelSN" Type="String" />

            <asp:Parameter Name="accessory11" Type="String" />

            <asp:Parameter Name="a11WhseSN" Type="String" />

            <asp:Parameter Name="a11ShopSN" Type="String" />

            <asp:Parameter Name="a11DelSN" Type="String" />

            <asp:Parameter Name="accessory12" Type="String" />

            <asp:Parameter Name="a12WhseSN" Type="String" />

            <asp:Parameter Name="a12ShopSN" Type="String" />

            <asp:Parameter Name="a12DelSN" Type="String" />

            <asp:Parameter Name="accessory13" Type="String" />

            <asp:Parameter Name="a13WhseSN" Type="String" />

            <asp:Parameter Name="a13ShopSN" Type="String" />

            <asp:Parameter Name="a13DelSN" Type="String" />

            <asp:Parameter Name="accessory14" Type="String" />

            <asp:Parameter Name="a14WhseSN" Type="String" />

            <asp:Parameter Name="a14ShopSN" Type="String" />

            <asp:Parameter Name="a14DelSN" Type="String" />

            <asp:Parameter Name="estDelTime" Type="String" />

            <asp:Parameter Name="placement" Type="Int32" />

            <asp:Parameter Name="m1" Type="String" />

            <asp:Parameter Name="m2" Type="String" />

        </InsertParameters>

    </asp:SqlDataSource>

    <asp:FormView ID="FormView4" runat="server" AllowPaging="True" 

        DataKeyNames="orderID" DataSourceID="SqlDataSource2" ForeColor="White" 

        style="margin-left: 44px; margin-right: 201px">

        <EditItemTemplate>

            orderID:

            <asp:Label ID="orderIDLabel1" runat="server" Text='<%# Eval("orderID") %>' />

            <br />

            <table>

            

            <tr><td align="right"><b>Time Submitted:</b></td>       

            <td><asp:TextBox ID="timeSubmittedtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("timeSubmitted") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Rep Id:</b></td>       

            <td><asp:TextBox ID="repIDtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("repID") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Sales Rep:</b></td>       

            <td><asp:TextBox ID="salesReptxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("salesRep") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Customer:</b></td>       

            <td><asp:TextBox ID="customertxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("customer") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Address:</b></td>       

            <td><asp:TextBox ID="addresstxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("address") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>City, State, Zip:</b></td>       

            <td><asp:TextBox ID="citytxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("cityStateZip") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Contact:</b></td>       

            <td><asp:TextBox ID="contacttxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("contact") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Phone:</b></td>       

            <td><asp:TextBox ID="phonetxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("phone") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">      

            <td><asp:TextBox ID="forecastMachineIdtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("forecastMachineId") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">

            <td><asp:TextBox ID="forecastIdtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("forecastId") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">       

            <td><asp:TextBox ID="forecastModeltxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("forecastModel") %>' 

                                         RunAt="Server" /></td></tr>                                                                                       

            <tr><td align="right"><b>Comments:</b></td>       

            <td><asp:TextBox ID="commentstxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke"

                                         Text='<%# Bind("comments") %>' 

                                         RunAt="Server" /></td></tr>

            <tr><td align="right"><b>Est Delivery Date:</b></td>       

            <td><asp:Calendar 

            

                    ID="dateNeededCalendar" 

                    RunAt="Server" BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Dotted" 

                    ForeColor="WhiteSmoke" 

                    SelectedDate='<%# Bind("neededDate") %>'>

                    <SelectedDayStyle BackColor="#FF9933" ForeColor="Black" />

                    <TitleStyle BackColor="Black" Font-Bold="True" ForeColor="#FF9933" />

                </asp:Calendar>

                    

                    </td></tr>

                    

                    

            <tr><td align="right"><b>Sale Type:</b></td>       

            <td><asp:DropDownList 

                    

                    ID="SaleTypeList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceSaleType"                     

                    DataTextField="saleType" 

                    DataValueField="saleType"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("saleType") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceSaleType" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblSaleType]">

                    </asp:SqlDataSource>

                                        

             </td></tr>

              

            <tr><td align="right"><b>Networking:</b></td>       

            <td><asp:DropDownList 

                    

                    ID="NetworkingList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceNetworking"                     

                    DataTextField="networking" 

                    DataValueField="networking"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("networking") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceNetworking" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblNetworking]">

                    </asp:SqlDataSource>

                                        

             </td></tr>                                

            <tr><td align="right"><b>Stairs:</b></td>       

            <td><asp:DropDownList 

                    

                    ID="StairsList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceStairs"                     

                    DataTextField="stairs" 

                    DataValueField="stairs"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("stairs") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceStairs" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblStairs]">

                    </asp:SqlDataSource>

                                        

             </td></tr>                             

             <tr><td align="right"><b>Stair Count:</b></td>       

             <td><asp:DropDownList 

                    

                    ID="StairCountList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceStairCount"                     

                    DataTextField="stairCount" 

                    DataValueField="stairCount"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("stairCount") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceStairCount" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblStairCount]">

                    </asp:SqlDataSource>

                                        

              </td></tr>                               

              <tr><td align="right"><b>Delivery Method:</b></td>       

             <td><asp:DropDownList 

                    

                    ID="DeliveryMethodList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceDeliveryMethod"                     

                    DataTextField="deliveryMethod" 

                    DataValueField="deliveryMethod"   

                    AutoPostBack="false"                   

                    SelectedValue='<%# Bind("deliveryMethod") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceDeliveryMethod" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblDeliveryMethod]">

                    </asp:SqlDataSource>

                                        

               </td></tr> 

               <tr><td align="right"><b>Model:</b></td> 

               <td><asp:DropDownList 

                    

                    ID="ModelList" 

                    BackColor="Black" 

                    BorderColor="LightGray" 

                    BorderStyle="Double" 

                    ForeColor="WhiteSmoke"

                    RunAt="Server" 

                    DataSourceID="SqlDataSourceModel"                     

                    DataTextField="model" 

                    DataValueField="model"   

                    AutoPostBack="true"                   

                    SelectedValue='<%# Bind("model") %>' Width="140px" >                    

                    

                    </asp:DropDownList>

                    

                    <asp:SqlDataSource 

                    ID="SqlDataSourceModel" 

                    runat="server" 

                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

                    SelectCommand="SELECT * FROM [tblEquipment]">

                    </asp:SqlDataSource>

                                        

              </td></tr>

              

            <tr visible="false">       

            <td><asp:TextBox ID="modelWhseSNtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("modelWhseSN") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">      

            <td><asp:TextBox ID="modelShopSNtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("modelShopSN") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">      

            <td><asp:TextBox ID="modelDelSNtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("modelDelSN") %>' 

                                         RunAt="Server" /></td></tr> 

            

            <tr visible="false">       

            <td><asp:TextBox ID="equipIdtxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("equipId") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">       

            <td><asp:TextBox ID="meterShoptxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("meterShop") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">       

            <td><asp:TextBox ID="m6txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m6") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="m7txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m7") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="m8txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m8") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="m3txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m3") %>' 

                                         RunAt="Server" /></td></tr>

            <tr visible="false">       

            <td><asp:TextBox ID="m4txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m4") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="m5txt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("m5") %>' 

                                         RunAt="Server" /></td></tr>                             

            <tr visible="false">       

            <td><asp:TextBox ID="meterDeltxt" BackColor="Black" BorderColor="LightGray" BorderStyle="Double" ForeColor="WhiteSmoke" Visible="false"

                                         Text='<%# Bind("meterDel") %>' 

                                         RunAt="Server" /></td></tr>                             

                                         

            

                        <table class="style1">

                            <tr>

                                <td>

                                    Model</td>

                                <td>

                                    &nbsp;</td>

                                <td class="style2">

                                    <asp:DropDownList ID="ddlModel" runat="server" Width="101px">

                                    </asp:DropDownList>

                                </td>

                            </tr>

                            <tr>

                                <td>

                                    Accessory</td>

                                <td>

                                    &nbsp;</td>

                                <td class="style2">

                                    <asp:DropDownList ID="ddlAcc1" runat="server" Width="101px">

                                    </asp:DropDownList>

                                </td>

                            </tr>

                            <tr>

                                <td>

                                    &nbsp;</td>

                                <td>

                                    &nbsp;</td>

                                <td class="style2">

                                    <asp:DropDownList ID="ddlAcc2" runat="server" Width="101px">

                                    </asp:DropDownList>

                                </td>

                            </tr>

                        </table>

                

                     

                    

                <cc1:CascadingDropDown 

                        ID="ccdEquipment" 

                        runat="server" 

                        TargetControlID="ddlmodel"  

                        Category="Model" 

                        PromptText="Please select a model." 

                        LoadingText="Please Wait!" 

                        ServicePath="ModelService.asmx" SelectedValue="

                        ServiceMethod="GetEquipment" >

                        

                        

                         

                

                </cc1:CascadingDropDown>                   

                                                                                                                                                                                                                                                                                                                                                                        

            </table>

            

           

           

            <br />

                            

          

           

           

           

            a1WhseSN:

            <asp:TextBox ID="a1WhseSNTextBox" runat="server" 

                Text='<%# Bind("a1WhseSN") %>' />

            <br />

            a1ShopSN:

            <asp:TextBox ID="a1ShopSNTextBox" runat="server" 

                Text='<%# Bind("a1ShopSN") %>' />

            <br />

            a1DelSN:

            <asp:TextBox ID="a1DelSNTextBox" runat="server" Text='<%# Bind("a1DelSN") %>' />

            <br />

            accessory2:

            <asp:TextBox ID="accessory2TextBox" runat="server" 

                Text='<%# Bind("accessory2") %>' />

            <br />

            a2WhseSN:

            <asp:TextBox ID="a2WhseSNTextBox" runat="server" 

                Text='<%# Bind("a2WhseSN") %>' />

            <br />

            a2ShopSN:

            <asp:TextBox ID="a2ShopSNTextBox" runat="server" 

                Text='<%# Bind("a2ShopSN") %>' />

            <br />

            a2DelSN:

            <asp:TextBox ID="a2DelSNTextBox" runat="server" Text='<%# Bind("a2DelSN") %>' />

            <br />

            accessory3:

            <asp:TextBox ID="accessory3TextBox" runat="server" 

                Text='<%# Bind("accessory3") %>' />

            <br />

            a3WhseSN:

            <asp:TextBox ID="a3WhseSNTextBox" runat="server" 

                Text='<%# Bind("a3WhseSN") %>' />

            <br />

            a3ShopSN:

            <asp:TextBox ID="a3ShopSNTextBox" runat="server" 

                Text='<%# Bind("a3ShopSN") %>' />

            <br />

            a3DelSN:

            <asp:TextBox ID="a3DelSNTextBox" runat="server" Text='<%# Bind("a3DelSN") %>' />

            <br />

            accessory4:

            <asp:TextBox ID="accessory4TextBox" runat="server" 

                Text='<%# Bind("accessory4") %>' />

            <br />

            a4WhseSN:

            <asp:TextBox ID="a4WhseSNTextBox" runat="server" 

                Text='<%# Bind("a4WhseSN") %>' />

            <br />

            a4ShopSN:

            <asp:TextBox ID="a4ShopSNTextBox" runat="server" 

                Text='<%# Bind("a4ShopSN") %>' />

            <br />

            a4DelSN:

            <asp:TextBox ID="a4DelSNTextBox" runat="server" Text='<%# Bind("a4DelSN") %>' />

            <br />

            accessory5:

            <asp:TextBox ID="accessory5TextBox" runat="server" 

                Text='<%# Bind("accessory5") %>' />

            <br />

            a5WhseSN:

            <asp:TextBox ID="a5WhseSNTextBox" runat="server" 

                Text='<%# Bind("a5WhseSN") %>' />

            <br />

            a5ShopSN:

            <asp:TextBox ID="a5ShopSNTextBox" runat="server" 

                Text='<%# Bind("a5ShopSN") %>' />

            <br />

            a5DelSN:

            <asp:TextBox ID="a5DelSNTextBox" runat="server" Text='<%# Bind("a5DelSN") %>' />

            <br />

            accessory6:

            <asp:TextBox ID="accessory6TextBox" runat="server" 

                Text='<%# Bind("accessory6") %>' />

            <br />

            a6WhseSN:

            <asp:TextBox ID="a6WhseSNTextBox" runat="server" 

                Text='<%# Bind("a6WhseSN") %>' />

            <br />

            a6ShopSN:

            <asp:TextBox ID="a6ShopSNTextBox" runat="server" 

                Text='<%# Bind("a6ShopSN") %>' />

            <br />

            a6DelSN:

            <asp:TextBox ID="a6DelSNTextBox" runat="server" Text='<%# Bind("a6DelSN") %>' />

            <br />

            accessory7:

            <asp:TextBox ID="accessory7TextBox" runat="server" 

                Text='<%# Bind("accessory7") %>' />

            <br />

            a7WhseSN:

            <asp:TextBox ID="a7WhseSNTextBox" runat="server" 

                Text='<%# Bind("a7WhseSN") %>' />

            <br />

            a7ShopSN:

            <asp:TextBox ID="a7ShopSNTextBox" runat="server" 

                Text='<%# Bind("a7ShopSN") %>' />

            <br />

            a7DelSN:

            <asp:TextBox ID="a7DelSNTextBox" runat="server" Text='<%# Bind("a7DelSN") %>' />

            <br />

            accessory8:

            <asp:TextBox ID="accessory8TextBox" runat="server" 

                Text='<%# Bind("accessory8") %>' />

            <br />

            a8WhseSN:

            <asp:TextBox ID="a8WhseSNTextBox" runat="server" 

                Text='<%# Bind("a8WhseSN") %>' />

            <br />

            a8ShopSN:

            <asp:TextBox ID="a8ShopSNTextBox" runat="server" 

                Text='<%# Bind("a8ShopSN") %>' />

            <br />

            a8DelSN:

            <asp:TextBox ID="a8DelSNTextBox" runat="server" Text='<%# Bind("a8DelSN") %>' />

            <br />

            accessory9:

            <asp:TextBox ID="accessory9TextBox" runat="server" 

                Text='<%# Bind("accessory9") %>' />

            <br />

            a9WhseSN:

            <asp:TextBox ID="a9WhseSNTextBox" runat="server" 

                Text='<%# Bind("a9WhseSN") %>' />

            <br />

            a9ShopSN:

            <asp:TextBox ID="a9ShopSNTextBox" runat="server" 

                Text='<%# Bind("a9ShopSN") %>' />

            <br />

            a9DelSN:

            <asp:TextBox ID="a9DelSNTextBox" runat="server" Text='<%# Bind("a9DelSN") %>' />

            <br />

            accessory10:

            <asp:TextBox ID="accessory10TextBox" runat="server" 

                Text='<%# Bind("accessory10") %>' />

            <br />

            a10WhseSN:

            <asp:TextBox ID="a10WhseSNTextBox" runat="server" 

                Text='<%# Bind("a10WhseSN") %>' />

            <br />

            a10ShopSN:

            <asp:TextBox ID="a10ShopSNTextBox" runat="server" 

                Text='<%# Bind("a10ShopSN") %>' />

            <br />

            a10DelSN:

            <asp:TextBox ID="a10DelSNTextBox" runat="server" 

                Text='<%# Bind("a10DelSN") %>' />

            <br />

            accessory11:

            <asp:TextBox ID="accessory11TextBox" runat="server" 

                Text='<%# Bind("accessory11") %>' />

            <br />

            a11WhseSN:

            <asp:TextBox ID="a11WhseSNTextBox" runat="server" 

                Text='<%# Bind("a11WhseSN") %>' />

            <br />

            a11ShopSN:

            <asp:TextBox ID="a11ShopSNTextBox" runat="server" 

                Text='<%# Bind("a11ShopSN") %>' />

            <br />

            a11DelSN:

            <asp:TextBox ID="a11DelSNTextBox" runat="server" 

                Text='<%# Bind("a11DelSN") %>' />

            <br />

            accessory12:

            <asp:TextBox ID="accessory12TextBox" runat="server" 

                Text='<%# Bind("accessory12") %>' />

            <br />

            a12WhseSN:

            <asp:TextBox ID="a12WhseSNTextBox" runat="server" 

                Text='<%# Bind("a12WhseSN") %>' />

            <br />

            a12ShopSN:

            <asp:TextBox ID="a12ShopSNTextBox" runat="server" 

                Text='<%# Bind("a12ShopSN") %>' />

            <br />

            a12DelSN:

            <asp:TextBox ID="a12DelSNTextBox" runat="server" 

                Text='<%# Bind("a12DelSN") %>' />

            <br />

            accessory13:

            <asp:TextBox ID="accessory13TextBox" runat="server" 

                Text='<%# Bind("accessory13") %>' />

            <br />

            a13WhseSN:

            <asp:TextBox ID="a13WhseSNTextBox" runat="server" 

                Text='<%# Bind("a13WhseSN") %>' />

            <br />

            a13ShopSN:

            <asp:TextBox ID="a13ShopSNTextBox" runat="server" 

                Text='<%# Bind("a13ShopSN") %>' />

            <br />

            a13DelSN:

            <asp:TextBox ID="a13DelSNTextBox" runat="server" 

                Text='<%# Bind("a13DelSN") %>' />

            <br />

            accessory14:

            <asp:TextBox ID="accessory14TextBox" runat="server" 

                Text='<%# Bind("accessory14") %>' />

            <br />

            a14WhseSN:

            <asp:TextBox ID="a14WhseSNTextBox" runat="server" 

                Text='<%# Bind("a14WhseSN") %>' />

            <br />

            a14ShopSN:

            <asp:TextBox ID="a14ShopSNTextBox" runat="server" 

                Text='<%# Bind("a14ShopSN") %>' />

            <br />

            a14DelSN:

            <asp:TextBox ID="a14DelSNTextBox" runat="server" 

                Text='<%# Bind("a14DelSN") %>' />

            <br />

            estDelTime:

            <asp:TextBox ID="estDelTimeTextBox" runat="server" 

                Text='<%# Bind("estDelTime") %>' />

            <br />

            placement:

            <asp:TextBox ID="placementTextBox" runat="server" 

                Text='<%# Bind("placement") %>' />

            <br />

            m1:

            <asp:TextBox ID="m1TextBox" runat="server" Text='<%# Bind("m1") %>' />

            <br />

            m2:

            <asp:TextBox ID="m2TextBox" runat="server" Text='<%# Bind("m2") %>' />

            <br />

            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 

                CommandName="Update" Text="Update" />

            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 

                CausesValidation="False" CommandName="Cancel" Text="Cancel" />

        </EditItemTemplate>

        <InsertItemTemplate>

            timeSubmitted:

            <asp:TextBox ID="timeSubmittedTextBox" runat="server" 

                Text='<%# Bind("timeSubmitted") %>' />

            <br />

            repID:

            <asp:TextBox ID="repIDTextBox" runat="server" Text='<%# Bind("repID") %>' />

            <br />

            salesRep:

            <asp:TextBox ID="salesRepTextBox" runat="server" 

                Text='<%# Bind("salesRep") %>' />

            <br />

            customer:

            <asp:TextBox ID="customerTextBox" runat="server" 

                Text='<%# Bind("customer") %>' />

            <br />

            address:

            <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />

            <br />

            cityStateZip:

            <asp:TextBox ID="cityStateZipTextBox" runat="server" 

                Text='<%# Bind("cityStateZip") %>' />

            <br />

            contact:

            <asp:TextBox ID="contactTextBox" runat="server" Text='<%# Bind("contact") %>' />

            <br />

            phone:

            <asp:TextBox ID="phoneTextBox" runat="server" Text='<%# Bind("phone") %>' />

            <br />

            forecastMachineId:

            <asp:TextBox ID="forecastMachineIdTextBox" runat="server" 

                Text='<%# Bind("forecastMachineId") %>' />

            <br />

            forecastId:

            <asp:TextBox ID="forecastIdTextBox" runat="server" 

                Text='<%# Bind("forecastId") %>' />

            <br />

            forecastModel:

            <asp:TextBox ID="forecastModelTextBox" runat="server" 

                Text='<%# Bind("forecastModel") %>' />

            <br />

            comments:

            <asp:TextBox ID="commentsTextBox" runat="server" 

                Text='<%# Bind("comments") %>' />

            <br />

            neededDate:

            <asp:TextBox ID="neededDateTextBox" runat="server" 

                Text='<%# Bind("neededDate") %>' />

            <br />

            saleType:

            <asp:TextBox ID="saleTypeTextBox" runat="server" 

                Text='<%# Bind("saleType") %>' />

            <br />

            networking:

            <asp:TextBox ID="networkingTextBox" runat="server" 

                Text='<%# Bind("networking") %>' />

            <br />

            stairs:

            <asp:TextBox ID="stairsTextBox" runat="server" Text='<%# Bind("stairs") %>' />

            <br />

            stairCount:

            <asp:TextBox ID="stairCountTextBox" runat="server" 

                Text='<%# Bind("stairCount") %>' />

            <br />

            deliveryMethod:

            <asp:TextBox ID="deliveryMethodTextBox" runat="server" 

                Text='<%# Bind("deliveryMethod") %>' />

            <br />

            model:

            <asp:TextBox ID="modelTextBox" runat="server" Text='<%# Bind("model") %>' />

            <br />

            modelWhseSN:

            <asp:TextBox ID="modelWhseSNTextBox" runat="server" 

                Text='<%# Bind("modelWhseSN") %>' />

            <br />

            modelShopSN:

            <asp:TextBox ID="modelShopSNTextBox" runat="server" 

                Text='<%# Bind("modelShopSN") %>' />

            <br />

            modelDelSN:

            <asp:TextBox ID="modelDelSNTextBox" runat="server" 

                Text='<%# Bind("modelDelSN") %>' />

            <br />

            equipId:

            <asp:TextBox ID="equipIdTextBox" runat="server" Text='<%# Bind("equipId") %>' />

            <br />

            meterShop:

            <asp:TextBox ID="meterShopTextBox" runat="server" 

                Text='<%# Bind("meterShop") %>' />

            <br />

            m6:

            <asp:TextBox ID="m6TextBox" runat="server" Text='<%# Bind("m6") %>' />

            <br />

            m7:

            <asp:TextBox ID="m7TextBox" runat="server" Text='<%# Bind("m7") %>' />

            <br />

            m8:

            <asp:TextBox ID="m8TextBox" runat="server" Text='<%# Bind("m8") %>' />

            <br />

            m3:

            <asp:TextBox ID="m3TextBox" runat="server" Text='<%# Bind("m3") %>' />

            <br />

            m4:

            <asp:TextBox ID="m4TextBox" runat="server" Text='<%# Bind("m4") %>' />

            <br />

            m5:

            <asp:TextBox ID="m5TextBox" runat="server" Text='<%# Bind("m5") %>' />

            <br />

            meterDel:

            <asp:TextBox ID="meterDelTextBox" runat="server" 

                Text='<%# Bind("meterDel") %>' />

            <br />

            accessory1:

            <asp:TextBox ID="accessory1TextBox" runat="server" 

                Text='<%# Bind("accessory1") %>' />

            <br />

            a1WhseSN:

            <asp:TextBox ID="a1WhseSNTextBox" runat="server" 

                Text='<%# Bind("a1WhseSN") %>' />

            <br />

            a1ShopSN:

            <asp:TextBox ID="a1ShopSNTextBox" runat="server" 

                Text='<%# Bind("a1ShopSN") %>' />

            <br />

            a1DelSN:

            <asp:TextBox ID="a1DelSNTextBox" runat="server" Text='<%# Bind("a1DelSN") %>' />

            <br />

            accessory2:

            <asp:TextBox ID="accessory2TextBox" runat="server" 

                Text='<%# Bind("accessory2") %>' />

            <br />

            a2WhseSN:

            <asp:TextBox ID="a2WhseSNTextBox" runat="server" 

                Text='<%# Bind("a2WhseSN") %>' />

            <br />

            a2ShopSN:

            <asp:TextBox ID="a2ShopSNTextBox" runat="server" 

                Text='<%# Bind("a2ShopSN") %>' />

            <br />

            a2DelSN:

            <asp:TextBox ID="a2DelSNTextBox" runat="server" Text='<%# Bind("a2DelSN") %>' />

            <br />

            accessory3:

            <asp:TextBox ID="accessory3TextBox" runat="server" 

                Text='<%# Bind("accessory3") %>' />

            <br />

            a3WhseSN:

            <asp:TextBox ID="a3WhseSNTextBox" runat="server" 

                Text='<%# Bind("a3WhseSN") %>' />

            <br />

            a3ShopSN:

            <asp:TextBox ID="a3ShopSNTextBox" runat="server" 

                Text='<%# Bind("a3ShopSN") %>' />

            <br />

            a3DelSN:

            <asp:TextBox ID="a3DelSNTextBox" runat="server" Text='<%# Bind("a3DelSN") %>' />

            <br />

            accessory4:

            <asp:TextBox ID="accessory4TextBox" runat="server" 

                Text='<%# Bind("accessory4") %>' />

            <br />

            a4WhseSN:

            <asp:TextBox ID="a4WhseSNTextBox" runat="server" 

                Text='<%# Bind("a4WhseSN") %>' />

            <br />

            a4ShopSN:

            <asp:TextBox ID="a4ShopSNTextBox" runat="server" 

                Text='<%# Bind("a4ShopSN") %>' />

            <br />

            a4DelSN:

            <asp:TextBox ID="a4DelSNTextBox" runat="server" Text='<%# Bind("a4DelSN") %>' />

            <br />

            accessory5:

            <asp:TextBox ID="accessory5TextBox" runat="server" 

                Text='<%# Bind("accessory5") %>' />

            <br />

            a5WhseSN:

            <asp:TextBox ID="a5WhseSNTextBox" runat="server" 

                Text='<%# Bind("a5WhseSN") %>' />

            <br />

            a5ShopSN:

            <asp:TextBox ID="a5ShopSNTextBox" runat="server" 

                Text='<%# Bind("a5ShopSN") %>' />

            <br />

            a5DelSN:

            <asp:TextBox ID="a5DelSNTextBox" runat="server" Text='<%# Bind("a5DelSN") %>' />

            <br />

            accessory6:

            <asp:TextBox ID="accessory6TextBox" runat="server" 

                Text='<%# Bind("accessory6") %>' />

            <br />

            a6WhseSN:

            <asp:TextBox ID="a6WhseSNTextBox" runat="server" 

                Text='<%# Bind("a6WhseSN") %>' />

            <br />

            a6ShopSN:

            <asp:TextBox ID="a6ShopSNTextBox" runat="server" 

                Text='<%# Bind("a6ShopSN") %>' />

            <br />

            a6DelSN:

            <asp:TextBox ID="a6DelSNTextBox" runat="server" Text='<%# Bind("a6DelSN") %>' />

            <br />

            accessory7:

            <asp:TextBox ID="accessory7TextBox" runat="server" 

                Text='<%# Bind("accessory7") %>' />

            <br />

            a7WhseSN:

            <asp:TextBox ID="a7WhseSNTextBox" runat="server" 

                Text='<%# Bind("a7WhseSN") %>' />

            <br />

            a7ShopSN:

            <asp:TextBox ID="a7ShopSNTextBox" runat="server" 

                Text='<%# Bind("a7ShopSN") %>' />

            <br />

            a7DelSN:

            <asp:TextBox ID="a7DelSNTextBox" runat="server" Text='<%# Bind("a7DelSN") %>' />

            <br />

            accessory8:

            <asp:TextBox ID="accessory8TextBox" runat="server" 

                Text='<%# Bind("accessory8") %>' />

            <br />

            a8WhseSN:

            <asp:TextBox ID="a8WhseSNTextBox" runat="server" 

                Text='<%# Bind("a8WhseSN") %>' />

            <br />

            a8ShopSN:

            <asp:TextBox ID="a8ShopSNTextBox" runat="server" 

                Text='<%# Bind("a8ShopSN") %>' />

            <br />

            a8DelSN:

            <asp:TextBox ID="a8DelSNTextBox" runat="server" Text='<%# Bind("a8DelSN") %>' />

            <br />

            accessory9:

            <asp:TextBox ID="accessory9TextBox" runat="server" 

                Text='<%# Bind("accessory9") %>' />

            <br />

            a9WhseSN:

            <asp:TextBox ID="a9WhseSNTextBox" runat="server" 

                Text='<%# Bind("a9WhseSN") %>' />

            <br />

            a9ShopSN:

            <asp:TextBox ID="a9ShopSNTextBox" runat="server" 

                Text='<%# Bind("a9ShopSN") %>' />

            <br />

            a9DelSN:

            <asp:TextBox ID="a9DelSNTextBox" runat="server" Text='<%# Bind("a9DelSN") %>' />

            <br />

            accessory10:

            <asp:TextBox ID="accessory10TextBox" runat="server" 

                Text='<%# Bind("accessory10") %>' />

            <br />

            a10WhseSN:

            <asp:TextBox ID="a10WhseSNTextBox" runat="server" 

                Text='<%# Bind("a10WhseSN") %>' />

            <br />

            a10ShopSN:

            <asp:TextBox ID="a10ShopSNTextBox" runat="server" 

                Text='<%# Bind("a10ShopSN") %>' />

            <br />

            a10DelSN:

            <asp:TextBox ID="a10DelSNTextBox" runat="server" 

                Text='<%# Bind("a10DelSN") %>' />

            <br />

            accessory11:

            <asp:TextBox ID="accessory11TextBox" runat="server" 

                Text='<%# Bind("accessory11") %>' />

            <br />

            a11WhseSN:

            <asp:TextBox ID="a11WhseSNTextBox" runat="server" 

                Text='<%# Bind("a11WhseSN") %>' />

            <br />

            a11ShopSN:

            <asp:TextBox ID="a11ShopSNTextBox" runat="server" 

                Text='<%# Bind("a11ShopSN") %>' />

            <br />

            a11DelSN:

            <asp:TextBox ID="a11DelSNTextBox" runat="server" 

                Text='<%# Bind("a11DelSN") %>' />

            <br />

            accessory12:

            <asp:TextBox ID="accessory12TextBox" runat="server" 

                Text='<%# Bind("accessory12") %>' />

            <br />

            a12WhseSN:

            <asp:TextBox ID="a12WhseSNTextBox" runat="server" 

                Text='<%# Bind("a12WhseSN") %>' />

            <br />

            a12ShopSN:

            <asp:TextBox ID="a12ShopSNTextBox" runat="server" 

                Text='<%# Bind("a12ShopSN") %>' />

            <br />

            a12DelSN:

            <asp:TextBox ID="a12DelSNTextBox" runat="server" 

                Text='<%# Bind("a12DelSN") %>' />

            <br />

            accessory13:

            <asp:TextBox ID="accessory13TextBox" runat="server" 

                Text='<%# Bind("accessory13") %>' />

            <br />

            a13WhseSN:

            <asp:TextBox ID="a13WhseSNTextBox" runat="server" 

                Text='<%# Bind("a13WhseSN") %>' />

            <br />

            a13ShopSN:

            <asp:TextBox ID="a13ShopSNTextBox" runat="server" 

                Text='<%# Bind("a13ShopSN") %>' />

            <br />

            a13DelSN:

            <asp:TextBox ID="a13DelSNTextBox" runat="server" 

                Text='<%# Bind("a13DelSN") %>' />

            <br />

            accessory14:

            <asp:TextBox ID="accessory14TextBox" runat="server" 

                Text='<%# Bind("accessory14") %>' />

            <br />

            a14WhseSN:

            <asp:TextBox ID="a14WhseSNTextBox" runat="server" 

                Text='<%# Bind("a14WhseSN") %>' />

            <br />

            a14ShopSN:

            <asp:TextBox ID="a14ShopSNTextBox" runat="server" 

                Text='<%# Bind("a14ShopSN") %>' />

            <br />

            a14DelSN:

            <asp:TextBox ID="a14DelSNTextBox" runat="server" 

                Text='<%# Bind("a14DelSN") %>' />

            <br />

            estDelTime:

            <asp:TextBox ID="estDelTimeTextBox" runat="server" 

                Text='<%# Bind("estDelTime") %>' />

            <br />

            placement:

            <asp:TextBox ID="placementTextBox" runat="server" 

                Text='<%# Bind("placement") %>' />

            <br />

            m1:

            <asp:TextBox ID="m1TextBox" runat="server" Text='<%# Bind("m1") %>' />

            <br />

            m2:

            <asp:TextBox ID="m2TextBox" runat="server" Text='<%# Bind("m2") %>' />

            <br />

            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 

                CommandName="Insert" Text="Insert" />

            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 

                CausesValidation="False" CommandName="Cancel" Text="Cancel" />

        </InsertItemTemplate>

        <ItemTemplate>

              <table> 

           <%-- make some rows not visible need id and runat--%>

           

            <tr id="orderIDrow" runat="server" visible="false" ><td align="right"><b>Order Id:</b></td>       

                <td style="color: #99CCFF"><%#Eval("orderID")%></td> </tr>

            <tr><td align="right"><b>Time Submitted:</b></td>       <td style="color: #99CCFF"><%#Eval("timeSubmitted")%></td></tr>

            <tr><td align="right"><b>Rep Id:</b></td>       <td style="color: #99CCFF"><%#Eval("repID")%></td></tr>

            <tr><td align="right"><b>Sales Rep:</b></td>       <td style="color: #99CCFF"><%#Eval("salesRep")%></td></tr>

            <tr><td align="right"><b>Customer:</b></td>       <td style="color: #99CCFF"><%#Eval("customer")%></td></tr>

            <tr><td align="right"><b>Address:</b></td>       <td style="color: #99CCFF"><%#Eval("address")%></td></tr>

            <tr><td align="right"><b>City, State, Zip:</b></td>       <td style="color: #99CCFF"><%#Eval("cityStateZip")%></td></tr>

            <tr><td align="right"><b>Contact:</b></td>       <td style="color: #99CCFF"><%#Eval("contact")%></td></tr>

            <tr><td align="right"><b>Phone:</b></td>       <td style="color: #99CCFF"><%#Eval("phone")%></td></tr>

            <tr><td align="right"><b>forecastMachineId:</b></td>       <td style="color: #99CCFF"><%#Eval("forecastMachineId")%></td></tr>

            <tr><td align="right"><b>forecastId:</b></td>       <td style="color: #99CCFF"><%#Eval("forecastId")%></td></tr>

            <tr><td align="right"><b>forecastModel:</b></td>       <td style="color: #99CCFF"><%#Eval("forecastModel")%></td></tr>

            <tr><td align="right"><b>Comments:</b></td>       <td style="color: #99CCFF"><%#Eval("comments")%></td></tr>

            <tr><td align="right"><b>Delivery Date:</b></td>       <td style="color: #99CCFF"><%#Eval("neededDate")%></td></tr>

            <tr><td align="right"><b>Sale Type:</b></td>       <td style="color: #99CCFF"><%#Eval("saleType")%></td></tr>

            <tr><td align="right"><b>Networking Required:</b></td>       <td style="color: #99CCFF"><%#Eval("networking")%></td></tr>

            <tr><td align="right"><b>Stairs:</b></td>       <td style="color: #99CCFF"><%#Eval("stairs")%></td></tr>

            <tr><td align="right"><b>Stair Count:</b></td>       <td style="color: #99CCFF"><%#Eval("stairCount")%></td></tr>

            <tr><td align="right"><b>Delivery Method:</b></td>       <td style="color: #99CCFF"><%#Eval("deliveryMethod")%></td></tr>

            <tr><td align="right"><b>Model:</b></td>       <td style="color: #99CCFF"><%#Eval("model")%></td></tr>

            <tr id="modelWhseSNrow" runat="server" visible="false"><td align="right"><b>modelWhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("modelWhseSN")%></td></tr>

            <tr id="modelShopSNrow" runat="server" visible="false"><td align="right"><b>modelShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("modelShopSN")%></td></tr>

            <tr id="Tr1" runat="server" visible="false"><td align="right"><b>modelDelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("modelDelSN")%></td></tr>

            <tr id="Tr2" runat="server" visible="false"><td align="right"><b>equipId:</b></td>       <td style="color: #99CCFF"><%#Eval("equipId")%></td></tr>

            <tr id="Tr3" runat="server" visible="false"><td align="right"><b>meterShop:</b></td>       <td style="color: #99CCFF"><%#Eval("meterShop")%></td></tr>

            <tr id="Tr4" runat="server" visible="false"><td align="right"><b>m6:</b></td>       <td style="color: #99CCFF"><%#Eval("m6")%></td></tr>

            <tr id="Tr5" runat="server" visible="false"><td align="right"><b>m7:</b></td>       <td style="color: #99CCFF"><%#Eval("m7")%></td></tr>

            <tr id="Tr6" runat="server" visible="false"><td align="right"><b>m8:</b></td>       <td style="color: #99CCFF"><%#Eval("m8")%></td></tr>

            <tr id="Tr7" runat="server" visible="false"><td align="right"><b>m3:</b></td>       <td style="color: #99CCFF"><%#Eval("m3")%></td></tr>

            <tr id="Tr8" runat="server" visible="false"><td align="right"><b>m4:</b></td>       <td style="color: #99CCFF"><%#Eval("m4")%></td></tr>

            <tr id="Tr9" runat="server" visible="false"><td align="right"><b>m5:</b></td>       <td style="color: #99CCFF"><%#Eval("m5")%></td></tr>

            <tr id="Tr10" runat="server" visible="false"><td align="right"><b>meterDel:</b></td>       <td style="color: #99CCFF"><%#Eval("meterDel")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory1")%></td></tr>

            <tr id="Tr11" runat="server" visible="false"><td align="right"><b>a1WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a1WhseSN")%></td></tr>

            <tr id="Tr12" runat="server" visible="false"><td align="right"><b>a1ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a1ShopSN")%></td></tr>

            <tr id="Tr13" runat="server" visible="false"><td align="right"><b>a1DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a1DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory2")%></td></tr>

            <tr id="Tr14" runat="server" visible="false"><td align="right"><b>a2WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a2WhseSN")%></td></tr>

            <tr id="Tr16" runat="server" visible="false"><td align="right"><b>a2ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a2ShopSN")%></td></tr>

            <tr id="Tr17" runat="server" visible="false"><td align="right"><b>a2DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a2DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory3")%></td></tr>

            <tr id="Tr18" runat="server" visible="false"><td align="right"><b>a3WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a3WhseSN")%></td></tr>

            <tr id="Tr19" runat="server" visible="false"><td align="right"><b>a3ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a3ShopSN")%></td></tr>

            <tr id="Tr20" runat="server" visible="false"><td align="right"><b>a3DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a3DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory4")%></td></tr>

            <tr id="Tr21" runat="server" visible="false"><td align="right"><b>a4WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a4WhseSN")%></td></tr>

            <tr id="Tr22" runat="server" visible="false"><td align="right"><b>a4ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a4ShopSN")%></td></tr>

            <tr id="Tr23" runat="server" visible="false"><td align="right"><b>a4DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a4DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory5")%></td></tr>

            <tr id="Tr24" runat="server" visible="false"><td align="right"><b>a5WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a5WhseSN")%></td></tr>

            <tr id="Tr25" runat="server" visible="false"><td align="right"><b>a5ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a5ShopSN")%></td></tr>

            <tr id="Tr26" runat="server" visible="false"><td align="right"><b>a5DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a5DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory6")%></td></tr>

            <tr id="Tr27" runat="server" visible="false"><td align="right"><b>a6WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a6WhseSN")%></td></tr>

            <tr id="Tr28" runat="server" visible="false"><td align="right"><b>a6ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a6ShopSN")%></td></tr>

            <tr id="Tr29" runat="server" visible="false"><td align="right"><b>a6DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a6DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory7")%></td></tr>

            <tr id="Tr30" runat="server" visible="false"><td align="right"><b>a7WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a7WhseSN")%></td></tr>

            <tr id="Tr31" runat="server" visible="false"><td align="right"><b>a7ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a7ShopSN")%></td></tr>

            <tr id="Tr32" runat="server" visible="false"><td align="right"><b>a7DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a7DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory8")%></td></tr>

            <tr id="Tr33" runat="server" visible="false"><td align="right"><b>a8WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a8WhseSN")%></td></tr>

            <tr id="Tr34" runat="server" visible="false"><td align="right"><b>a8ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a8ShopSN")%></td></tr>

            <tr id="Tr35" runat="server" visible="false"><td align="right"><b>a8DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a8DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory9")%></td></tr>

            <tr id="Tr36" runat="server" visible="false"><td align="right"><b>a9WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a9WhseSN")%></td></tr>

            <tr id="Tr37" runat="server" visible="false"><td align="right"><b>a9ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a9ShopSN")%></td></tr>

            <tr id="Tr38" runat="server" visible="false"><td align="right"><b>a9DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a9DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory10")%></td></tr>

            <tr id="Tr39" runat="server" visible="false"><td align="right"><b>a10WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a10WhseSN")%></td></tr>

            <tr id="Tr40" runat="server" visible="false"><td align="right"><b>a10ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a10ShopSN")%></td></tr>

            <tr id="Tr41" runat="server" visible="false"><td align="right"><b>a10DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a10DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory11")%></td></tr>

            <tr id="Tr42" runat="server" visible="false"><td align="right"><b>a11WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a11WhseSN")%></td></tr>

            <tr id="Tr43" runat="server" visible="false"><td align="right"><b>a11ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a11ShopSN")%></td></tr>

            <tr id="Tr44" runat="server" visible="false"><td align="right"><b>a11DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a11DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory12")%></td></tr>

            <tr id="Tr45" runat="server" visible="false"><td align="right"><b>a12WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a12WhseSN")%></td></tr>

            <tr id="Tr46" runat="server" visible="false"><td align="right"><b>a12ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a12ShopSN")%></td></tr>

            <tr id="Tr47" runat="server" visible="false"><td align="right"><b>a12DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a12DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory13")%></td></tr>

            <tr id="Tr48" runat="server" visible="false"><td align="right"><b>a13WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a13WhseSN")%></td></tr>

            <tr id="Tr49" runat="server" visible="false"><td align="right"><b>a13ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a13ShopSN")%></td></tr>

            <tr id="Tr50" runat="server" visible="false"><td align="right"><b>a13DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a13DelSN")%></td></tr>

            

            <tr><td align="right"><b>Accessory:</b></td>       <td style="color: #99CCFF"><%#Eval("accessory14")%></td></tr>

            <tr id="Tr51" runat="server" visible="false"><td align="right"><b>a14WhseSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a14WhseSN")%></td></tr>

            <tr id="Tr52" runat="server" visible="false"><td align="right"><b>a14ShopSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a14ShopSN")%></td></tr>

            <tr id="Tr53" runat="server" visible="false"><td align="right"><b>a14DelSN:</b></td>       <td style="color: #99CCFF"><%#Eval("a14DelSN")%></td></tr>

            

            <tr id="Tr54" runat="server" visible="false"><td align="right"><b>estDelTime:</b></td>       <td style="color: #99CCFF"><%#Eval("estDelTime")%></td></tr>

            <tr id="Tr55" runat="server" visible="false"><td align="right"><b>placement:</b></td>       <td style="color: #99CCFF"><%#Eval("placement")%></td></tr>

            <tr id="Tr56" runat="server" visible="false"><td align="right"><b>m1:</b></td>       <td style="color: #99CCFF"><%#Eval("m1")%></td></tr>

            <tr id="Tr57" runat="server" visible="false"><td align="right"><b>m2:</b></td>       <td style="color: #99CCFF"><%#Eval("m2")%></td></tr>

            

            

            </table>

            <br />

            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 

                CommandName="Edit" Text="Edit" ForeColor="#99CCFF" />

            &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 

                CommandName="Delete" Text="Delete" ForeColor="#99CCFF" />

            &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 

                CommandName="New" Text="New" ForeColor="#99CCFF" />

        </ItemTemplate>

    </asp:FormView>

    </form>

</body>

</html>

Open in new window

0
 
LVL 33

Expert Comment

by:raterus
ID: 21869119
I'm sure it works great, but I don't know anything about the Cascading DropDownList in the AJAX control toolkit.  I honestly don't see a point to the control, since you can easily rig this type of setup manually.

Back to my first question, how are you getting items into these dropdownlists to begin with, forget about selecting them for now, what are you doing to put selections into this list?
0
 

Author Comment

by:toddpotter
ID: 21869303
I have them linked to a database that stores the values.  I have one table for models and I have another table (one-to-many relationship) that stores the accessories that can go on each model.  

I did a quick "dummy" page to show you how I'm getting the controls filled.  

In my "actual scenario" these controls will be on the edit template of my formview.

Talking through it this is what I think needs to happen (although I don't know how to make it happen):

When the edit button is clicked the model and accessory drop downs need to be unbound from the order table and bound respectively to the equipment and accessory tables with the default value as the one sitting in the order table for the current record.

When the update button is clicked the chosen values need to be stored and the equipment and accessory controls need to be rebound to the order table and updated.  
</head>

<body>

    <form id="form1" runat="server">

    <div>

    

    </div>

    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 

        DataSourceID="SqlDataSource1" DataTextField="model" DataValueField="model" 

        Height="23px" Width="193px">

    </asp:DropDownList>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 

        ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

        SelectCommand="SELECT [model] FROM [tblEquipment]"></asp:SqlDataSource>

    <asp:DropDownList ID="DropDownList2" runat="server" 

        DataSourceID="SqlDataSource2" DataTextField="accessory" 

        DataValueField="accessory" Width="195px">

    </asp:DropDownList>

    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 

        ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>" 

        SelectCommand="SELECT [accessory] FROM [tblEquipmentAccessory] WHERE ([model] = @model)">

        <SelectParameters>

            <asp:ControlParameter ControlID="DropDownList1" Name="model" 

                PropertyName="SelectedValue" Type="String" />

        </SelectParameters>

    </asp:SqlDataSource>

    </form>

</body>

</html>

Open in new window

0
 
LVL 33

Expert Comment

by:raterus
ID: 21869416
Wait wait wait, lets stay on target with your original question.  If you need help getting the changed values back into your database, that's something that should be asked in a new question.

In your last code example, is that working?  I see you are using DataSource Controls, and you have it configured exactly how I would have configured it.  Do you still have the error you mentioned in the start of this question?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:toddpotter
ID: 21869509
It works only because it is not bound to the order table (it's only bound to the equipment and accessory tables).  The binding to the order table is why I am getting the error that I originally referred to.  There is something going on between the binding of the order table and the binding of the equipment and accessories.

Model alone (this works fine - no problem):

<td><asp:DropDownList
                   
                    ID="ModelList"
                    BackColor="Black"
                    BorderColor="LightGray"
                    BorderStyle="Double"
                    ForeColor="WhiteSmoke"
                    RunAt="Server"
                    DataSourceID="SqlDataSourceModel"                    
                    DataTextField="model"
                    DataValueField="model"  
                    AutoPostBack="true"                  
                    SelectedValue='<%# Bind("model") %>' Width="140px" >                    
                   
                    </asp:DropDownList>
                   
                    <asp:SqlDataSource
                    ID="SqlDataSourceModel"
                    runat="server"
                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>"
                    SelectCommand="SELECT * FROM [tblEquipment]">
                    </asp:SqlDataSource>
                                       
              </td></tr>

When I add the below code for the accessories is when the exception gets thrown:

<tr><td align="right"><b>Accessory1:</b></td>
               <td><asp:DropDownList
                   
                    ID="DropDownList1"
                    BackColor="Black"
                    BorderColor="LightGray"
                    BorderStyle="Double"
                    ForeColor="WhiteSmoke"
                    RunAt="Server"
                    DataSourceID="SqlDataSourceAccessory"                    
                    DataTextField="accessory"
                    DataValueField="accessory"  
                    AutoPostBack="true"                  
                    SelectedValue='<%# Bind("accessory1") %>' Width="140px" >                    
                   
                    </asp:DropDownList>
                   
                    <asp:SqlDataSource
                    ID="SqlDataSourceAccessory"
                    runat="server"
                    ConnectionString="<%$ ConnectionStrings:IMSwebConnectionString %>"
                    SelectCommand="SELECT [accessory] FROM [tblEquipmentAccessory] WHERE ([model] = @model)">
                    <SelectParameters>
                            <asp:ControlParameter ControlID="ModelList" Name="model"
                            PropertyName="SelectedValue" Type="String" />
                            </SelectParameters>
                    </asp:SqlDataSource>
                                       
              </td></tr>


Once we get this I'll open a new question for the changed values.
0
 

Author Comment

by:toddpotter
ID: 21869645
Ok raterus-

You're inquiry got me thinking and the value exception is being thrown because "accessory1" in the order table is ' ' and that value doesn't exist in the [tblEquipmentAccessory].  So how do I get around the ' ' values because the default value is actually ' ' to eliminate null issues.  I don't want to add a ' ' record for every one to many relationship in the table.

0
 
LVL 33

Expert Comment

by:raterus
ID: 21869903
They only way I know around this is to remove "SelectedValue='<%# Bind("accessory1") %>'" from the dropdownlist, then in the DataBound event of the FormView use some code like this

Hope you are using VB?



Protected Sub myFormView_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles myFormView.DataBound
 

  Dim ddl as DropDownList = DirectCast(myFormView.Row.FindControl("DropDownList1"), DropDownList)
 

  Dim selectedValue as String = DataBinder.Eval(myFormView.DataItem, "accessory1")

  Dim li as ListItem = ddl.Items.FindByValue(selectedValue)

  if li IsNot Nothing then

    ddl.ClearSelection

    li.Selected = true

  else

    li = new Listitem("-- Please Select --", "")

    ddl.Items.Insert(0, li)

  end if 
 

End Sub

Open in new window

0
 

Author Comment

by:toddpotter
ID: 21873925
I added a UNION SELECT to my dataset to account for the ' ' value.

SelectCommand="SELECT accessory FROM tblEquipmentAccessory WHERE (model = @model) UNION SELECT ' ' AS accessory">

However, I get an error when reselecting the model because the existing accessory is tied to the previous model and the data needs to be re-populated in the accessory drop down list when a new model gets chosen.  Any ideas on how to accomplish this?                    
0
 
LVL 33

Expert Comment

by:raterus
ID: 21874479
I gave you an option, I'm not quite sure why you opted to go another route and not even tell me why my suggestion didn't work?
0
 

Author Comment

by:toddpotter
ID: 21874893
Sorry...no disrespect intended.

I received an error on page load.  The error I received was on the line: Dim li As ListItem = ddl.Items.FindByValue(selectedValue)

Error:
NullReferenceException was unhandled by user code
Object reference not set to an instance of an object

The reason I tried to go another route is because I didn't know how to handle the exception.  I'm willing to go your route but my experience in web development is minimal and I'm trying to learn as I go but sometimes I just get stumped.  I thought of another way so I tried it and it worked.  If you're willing to work with me through the exception then let's go; I'm all for it.  I'm more then willing to b/c the more I learn the better I'll be.

From what I gather in your code:

We're getting the Accessory1List from the Formview and checking it's selected value.  Then we set the value as a list item (which is where the exception is thrown-apparently there is no instance of the object??).  If the item has value the drop down selection is cleared and the item in "li" is set as the selected item (not sure why we do this - Why not just leave it as is?).  Else if the li is nothing we add a new list item with text of "--Please Select--" and a value of "".  We then insert that item into the the list.




This is the code I entered:
 

 Protected Sub FormView4_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView4.DataBound
 

        Dim ddl As DropDownList = DirectCast(FormView4.Row.FindControl("Accessory1List"), DropDownList)
 

        Dim selectedValue As String = DataBinder.Eval(FormView4.DataItem, "accessory1")

        Dim li As ListItem = ddl.Items.FindByValue(selectedValue)

        If li IsNot Nothing Then

            ddl.ClearSelection()

            li.Selected = True

        Else

            li = New ListItem("-- Please Select --", "")

            ddl.Items.Insert(0, li)

        End If
 

    End Sub

Open in new window

0
 
LVL 33

Accepted Solution

by:
raterus earned 500 total points
ID: 21874990
Sorry, I gave you buggy code to begin with.  This dropdownlist only exists when you edit, however the error was throwing because this code runs anytime the FormView is bound.  Try this change (checking the CurrentMode for edits only)

 Protected Sub FormView4_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView4.DataBound
 
  if FormView4.CurrentMode = FormViewMode.Edit Then
        Dim ddl As DropDownList = DirectCast(FormView4.Row.FindControl("Accessory1List"), DropDownList)
        Dim selectedValue As String = DataBinder.Eval(FormView4.DataItem, "accessory1")
        Dim li As ListItem = ddl.Items.FindByValue(selectedValue)
        If li IsNot Nothing Then
            ddl.ClearSelection()
            li.Selected = True
        Else
            li = New ListItem("-- Please Select --", "")
            ddl.Items.Insert(0, li)
        End If
   end if
 
    End Sub


0
 

Author Comment

by:toddpotter
ID: 21875765
Ok.  The drop down list is now populating correctly, but the update is not saving the changes.  I'm guessing because it's not bound since we eliminated the "SelectedValue='<%# Bind("accessory1") %>'"?????
0
 
LVL 33

Expert Comment

by:raterus
ID: 21875873
That is a whole new issue, and I don't think it would be related to removing the statement you just posted.  Post all your code and problem in a new question, and if I think I know your problem, I'll chime in, if not, another expert will certainly be able to assist.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
asp.net bundle 8 36
Hovering effect 9 29
display data in text field from data base for updating 6 28
Change data in datatable 8 15
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now