i have got 4 linkbutton controls with command arguments....when the linkbutton is clicked it populates the datalist based on the command argument...
and i have a radio button list control that filters the data according to price that is populated in the datalist......
on page load,the datalist is populated with all the items....when i use rbtnlistcontrol on page load,it works as expected, but when i click any link button and then price radiobutton control,it doesn't filter the result/data.....
here's my html,
CommandArgument="1" OnClick="lbtnmenu_click">Mobile
CommandArgument="2" OnClick="lbtnmenu_click">Shoes
CommandArgument="3" OnClick="lbtnmenu_click">Bags
CommandArgument="4" OnClick="lbtnmenu_click">Clothing
RepeatLayout="Table"
onselectedindexchanged="rblbrands_SelectedIndexChanged">
AutoPostBack="True" Font-Size="1em" Width="100%"
onselectedindexchanged="rblpricerange_SelectedIndexChanged">
RepeatDirection="Horizontal" CellPadding="0" CellSpacing="0" BackColor="Aqua"
Width="100%">
<%# Eval("Name") %> |
Productid: font-weight: 500;"> <%# Eval("Productid") %> Description <%# Eval("Description") %> ImageUrl: <%# Eval("ImageUrl")%> Price: <%# Eval("Price")%> Quantity: <%# Eval("Quantity")%> Add To Cart |
& here's my code for selectec index changed
protected void rblpricerange_SelectedIndexChanged(object sender, EventArgs e)
{
string brands = null;
if (rblbrands.Items.Cast().Any(x => x.Selected))
{
brands = rblbrands.SelectedItem.Text;
}
int price = Convert.ToInt32(rblpricerange.SelectedValue);
/*dlCustomers.DataSource = GetCustomersData(pageindex,categoryid,brands,price); */
dlCustomers.DataSource = GetCustomersData(1, 0, brands, price);
dlCustomers.DataBind();
Label1.Text = "Radio button list value : " + rblpricerange.SelectedValue;
}
thanks in advance......
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.


Aniruddh KewatPosted Jun 18, 2015, 6:01 AM
Khan Abrar AhmedPosted Jun 18, 2015, 3:08 AM