<asp:datalist id="DataList1" datakeyfield="id" runat="server" xmlns:asp="#unknown">
<itemtemplate>
Price:<asp:label id="Label5" runat="server" text="<%#Eval("PRICE") %>"></asp:label>
Quantity:<asp:dropdownlist id="DropDownList1" runat="server" onselectedindexchanged="DropDownList1_SelectedIndexChanged" autopostback="true">
<asp:listitem text="0" value="0" selected="True"></asp:listitem>
<asp:listitem text="1" value="1"></asp:listitem>
<asp:listitem text="2" value="2"></asp:listitem>
<asp:listitem text="3" value="3"></asp:listitem>
<asp:listitem text="4" value="4"></asp:listitem>
<asp:listitem text="5" value="5"></asp:listitem>
</asp:dropdownlist>
Total:<asp:label id="Label7" runat="server"></asp:label>
</itemtemplate>
</asp:datalist>
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
var ddlList = (DropDownList)sender;
var row = (DataListItem)ddlList.NamingContainer;
int index = row.ItemIndex;
var p = Convert.ToInt32(((Label)row.FindControl("Label5")).Text);
var q = Convert.ToInt32(ddlList.SelectedItem.Value);
var res = Convert.ToInt32(p * q);
Label lblRes = ((Label)row.FindControl("Label7"));
lblRes.Text = res.ToString();
}