I working on Invoice Function . I create a seletec box to select the product i want to invoice.Here my razor view
IEnumerable<ProductItem> lstProduct = ViewBag.ListProduct as IEnumerable<ProductItem>
<select class="ddlProduct" name="ddlProduct">
@foreach (var item in lstProduct)
{
<option value="@item.ProductItemsId"> @item.Product.ProductName</option>
}
</select>
<select class="ddlSize" name="ddlSize">
@{
var list = lstSize.Where(n => n.ProductItemsId == selectedProductId);
foreach (var item in list)
{
<option value="@item.ProductItemsId"> @item.Size.SizeName</option>
}
}
</select>
<select class="ddlColor" name="">
@foreach (var item in lstColor)
{
<option value="@item.ProductItemsId"> @item.Colors.ColorName</option>
}
</select>
The website will be like this enter image description here
I want when a user changes a product, the color and size will also change accordingly the product id of that product. My design database enter image description here
So there is anyway that i can get the productItemsID and pass to Size select box and Color
to get corresponding products
I working on Invoice Function . I create a seletec box to select the product i want to invoice.Here my razor view
IEnumerable<ProductItem> lstProduct = ViewBag.ListProduct as IEnumerable<ProductItem>
<select class="ddlProduct" name="ddlProduct">
@foreach (var item in lstProduct)
{
<option value="@item.ProductItemsId"> @item.Product.ProductName</option>
}
</select>
<select class="ddlSize" name="ddlSize">
@{
var list = lstSize.Where(n => n.ProductItemsId == selectedProductId);
foreach (var item in list)
{
<option value="@item.ProductItemsId"> @item.Size.SizeName</option>
}
}
</select>
<select class="ddlColor" name="">
@foreach (var item in lstColor)
{
<option value="@item.ProductItemsId"> @item.Colors.ColorName</option>
}
</select>
The website will be like this
I want when a user changes a product, the color and size will also change accordingly the product id of that product. My design database
[2]: https://i.stack.imgur.com/59qTU.png
So there is anyway that i can get the productItemsID and pass to Size select box and Color
to get corresponding products
I have javascript many way but it wont work. Does anyone got solution ? I really appreciate your contribution