HiTeam,
i have a Asp.net web page with masterpage ,i am trying to get customer orders from database and trying to create a vender order against each customer order in database now i need dynamic html table with text boxes for entering orderitems like product name ,sku price qty, item total in productinfo: row in my code please help i have tried all possible ways from aspsnippets but, i cannot save data from dynamic rows
<div class="container">
<div id="divsearch" runat="server">
<asp:TextBox ID="TxtSearch" placeholder="Search OrderNumber Or PONumber" runat="server"></asp:TextBox>
<asp:Button ID="BtnSearch" runat="server" Text="Search" OnClick="BtnSearch_Click" />
</div>
<div id="Maindiv" class="MainOrdrsDiv">
<div id="SalesDiv" class="OrdrsDiv" runat="server">
<h2>Sales Order Information</h2>
<div>
<asp:HiddenField ID="HdnCID" runat="server" />
<asp:HiddenField ID="HdnCSOID" runat="server" />
</div>
<table border="1">
<tr>
<td>Name:</td>
<td>
<asp:TextBox ID="txtCustomerName" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Billing Name:</td>
<td>
<asp:TextBox ID="txtBillingName" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Shipping Name:</td>
<td>
<asp:TextBox ID="txtShippingname" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Email:</td>
<td>
<asp:TextBox ID="txtCustomerEmail" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Contact:</td>
<td>
<asp:TextBox ID="txtCustomerContact" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>State:</td>
<td>
<asp:DropDownList ID="ddlState" runat="server" ReadOnly="true">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>City:</td>
<td>
<asp:TextBox ID="txtcity" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Zip Code:</td>
<td>
<asp:TextBox ID="txtZipCode" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Order Number:</td>
<td>
<asp:TextBox ID="txtordnumber" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Products:
</td>
<td>
<table border="1" id="salesproduct" runat="server" enableviewstate="true">
</table>
</td>
</tr>
<tr>
<td>TaxRate:</td>
<td>
<asp:TextBox ID="txtTaxRate" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>TaxAmount:</td>
<td>
<asp:TextBox ID="txtTaxAmount" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>SubTotal:</td>
<td>
<asp:TextBox ID="txtsubtotal" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Total:</td>
<td>
<asp:TextBox ID="txtTotal" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Coupon:</td>
<td>
<asp:TextBox ID="txtCoupon" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Coupon Value:</td>
<td>
<asp:TextBox ID="txtCouponvalue" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Shipping Method:</td>
<td>
<asp:DropDownList ID="ddlShippingType" runat="server" ReadOnly="true"></asp:DropDownList>
</td>
</tr>
<tr>
<td>Shipping Charge:</td>
<td>
<asp:TextBox ID="txtShippingCharge" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Ordered Date:</td>
<td>
<asp:TextBox ID="txtOrderedDate" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
<tr>
<td>Status:</td>
<td>
<asp:DropDownList ID="ddlStatus" runat="server" ReadOnly="true"></asp:DropDownList>
</td>
</tr>
<tr>
<td>Order Closing Date:</td>
<td>
<asp:TextBox ID="txtOrderClosingDate" runat="server" ReadOnly="true"></asp:TextBox>
</td>
</tr>
</table>
</div>
<div id="Prchsdiv" class="OrdrsDiv" runat="server">
<asp:HiddenField ID="HdnOrderId" runat="server" />
<table border="1">
<tr>
<td colspan="2">
<h2>Vendor Order Information</h2>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblOrderNumber" runat="server" Text="Order Number:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtVOrderNumber" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblPONumber" runat="server" Text="PO Number:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtVPONumber" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblVendorID" runat="server" Text="Vendor :"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlVendors" runat="server" />
</td>
</tr>
<tr>
<td>ProductInfo: </td>
<td colspan="1">
<asp:LinkButton ID="lnkAddNewProduct" runat="server" Text="Add New Product" Visible="false" OnClick="lnkAddNewProduct_Click" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblvSubtotal" runat="server" Text="Total Amount:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtVSubtotal" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblvOrderDate" runat="server" Text="Order Date:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtVOrderDate" runat="server" TextMode="Date"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblTax" runat="server" Text="Tax:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtTax" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblShippingCharges" runat="server" Text="Shipping Charges:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtVShippingCharges" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblTotalAmount" runat="server" Text="Total Amount:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtVTotalAmount" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnSubmitVndrOrdr" runat="server" Text="Submit Order" OnClick="btnSubmitVndrOrdr_Click" />
</td>
<%--<td>
<asp:Button ID="SaveVndrOrdr" runat="server" Text="Save" OnClick="SaveVndrOrdr_Click" />
<asp:Button ID="CancelVndrOrdr" runat="server" Text="Cancel" OnClick="CancelVndrOrdr_Click" />
</td>--%>
</tr>
</table>
</div>
</div>
<div id="gvDiv" runat="server">
<asp:GridView ID="gvVendorOrders" runat="server" AutoGenerateColumns="False" DataKeyNames="VOrderID">
<columns>
<asp:BoundField DataField="VOrderID" HeaderText="Order ID" />
<asp:BoundField DataField="VOrderNumber" HeaderText="Order Number" />
<asp:BoundField DataField="PONumber" HeaderText="PO Number" />
<asp:TemplateField HeaderText="Vendor Name" runat="server">
<itemtemplate runat="server">
<%# GetVendorName(Convert.ToInt32(Eval("VendorID"))) %>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Order Items">
<itemtemplate>
<asp:LinkButton ID="btnPopulateInnerGrid" runat="server" CommandName="PopulateInnerGrid" CommandArgument='<%# Container.DataItemIndex %>' Text="Orderitems"
OnClientClick='<%# "toggleInnerGrid(" + Container.DataItemIndex + "); return false;" %>'>
</asp:LinkButton>
<asp:GridView ID="gvOrderItems" runat="server" AutoGenerateColumns="False">
<columns>
<asp:BoundField DataField="VItemID" HeaderText="Item ID" />
<asp:BoundField DataField="VSKU" HeaderText="SKU" />
<asp:BoundField DataField="Quantity" HeaderText="Quantity" />
<asp:BoundField DataField="UnitPrice" HeaderText="Unit Price" />
<asp:BoundField DataField="Subtotal" HeaderText="Subtotal" />
<%--<asp:TemplateField HeaderText="Actions">
<ItemTemplate>
<asp:Button ID="btnSubmitItem" runat="server" Text="Submit" CommandName="SubmitItem" CommandArgument='<%# Container.DataItemIndex %>' />
<asp:Button ID="btnViewItem" runat="server" Text="View" CommandName="ViewItem" CommandArgument='<%# Eval("VItemID") %>' />
<asp:Button ID="btnDeleteItem" runat="server" Text="Delete" CommandName="DeleteItem" CommandArgument='<%# Eval("VItemID") %>' />
</ItemTemplate>
</asp:TemplateField>--%>
</columns>
</asp:GridView>
</itemtemplate>
</asp:TemplateField>
<asp:BoundField DataField="OrderDate" HeaderText="Order Date" DataFormatString="{0:MM/dd/yyyy}" />
<asp:BoundField DataField="Tax" HeaderText="Tax" />
<asp:BoundField DataField="ShippingCharges" HeaderText="Shipping Charges" />
<asp:BoundField DataField="TotalAmount" HeaderText="Total Amount" />
<%-- <asp:TemplateField HeaderText="Actions">
<ItemTemplate>
<asp:Button ID="btnView" runat="server" Text="View" CommandName="View" CommandArgument='<%# Eval("VOrderID") %>' />
<asp:Button ID="btnDelete" runat="server" Text="Delete" CommandName="Delete" CommandArgument='<%# Eval("VOrderID") %>' />
</ItemTemplate>
</asp:TemplateField>--%>
</columns>
</asp:GridView>
</div>
</div>