TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aniruddh Kewat
NA
30
20.7k
Value of variable categoryid is not updated,when radiobutton
Jun 22 2015 9:29 AM
int categoryid = 0;
string brands = null;
int price = 0;
protected void Page_Load(object sender, EventArgs e)
{
//int categoryid = Convert.ToInt32((sender as LinkButton).CommandArgument);
if (!IsPostBack)
{
//dlCustomers.DataSource = GetCustomersData(pageindex,categoryid,brands,price);
dlCustomers.DataSource = GetCustomersData(1, categoryid, null, 0);
dlCustomers.DataBind();
}
}
protected void lbtnmenu_click(object sender, EventArgs e) { categoryid = Convert.ToInt32((sender as LinkButton).CommandArgument); Label1.Text = "CategoryId : " + categoryid;
if (rblpricerange.Items.Cast<ListItem>().Any(x => x.Selected)) { price = Convert.ToInt32(rblpricerange.SelectedValue); } //dlCustomers.DataSource = GetCustomersData(pageindex,categoryid,brands,price); dlCustomers.DataSource = GetCustomersData(1, categoryid, brands, price); dlCustomers.DataBind();
Getbrands(categoryid); foreach(ListItem li in rblpricerange.Items) { if(li.Selected) { li.Selected = false; } } }
protected void rblpricerange_SelectedIndexChanged(object sender, EventArgs e)
{
if (rblbrands.Items.Cast<ListItem>().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, categoryid, brands, price);
dlCustomers.DataBind();
Label2.Text = " CategoryId : " + categoryid + " ,rbtnpricerange : " + rblpricerange.SelectedValue;
}
Reply
Answers (
0
)
Passing textbox value to action using razor.
how to move next record in textbox display in asp.net