我有一个listview,我从一个存储过程中获取数据源(选择*产品),然后在Listview中我有下拉列表,我想要填充另一个过程,该过程获取当前产品的id并返回下拉列表的值列表。但是如何调用第二个存储过程呢?
<asp:ListView ID="listProducts" runat="server">
<ItemTemplate>
<div class="productoverlay">
<div class="col-lg-4 proizvod">
<div class="product">
<div class="glow"></div>
<img src='<%# "../productimg/" + Eval("FileName")%>' />
</div>
</div>
<div class="col-lg-8 pushtop">
<h1><%# Eval("ProductName") %></h1>
<p>Description: </p>
<p><%# Eval("ProductDescription") %></p>
<p>Quantity <%#Eval("Unit") %>:</p><input type='number' id='numberinput' name='mynumber' value='1' />
<select runat="server" id="drpSubcat">
<option>Values from another procedure</option>
</select>
<button type="button">Add to cart</button>
</div>
</div>
</ItemTemplate>
</asp:ListView>
答案 0 :(得分:0)
使用带有ObjectDataSource的asp net DropDownList,而不是select标签
像这样: Dropdown list bound to object data source - how to update on a button click