problem in pagerefresh in asp.net

Posted by hareeshkumarkr-16190 under ASP.NET on 6/11/2012 | Points: 10 | Views : 884 | Status : [Member] | Replies : 3
dear sir

i have created a advance search page where in that at the left hand side i have included search criteria as shown in attached image in that i have included one dropdownlist and three radio button and dynamically from database i have created the category list my problem is when i select some option in drop down and select the radio button then when i click on category list it works fine for first time at the same time my page gets refresh and drop down selection and radiobutton selection will become reset. how to solve this error after reset also the selection must remain same.




Responses

Posted by: Gemamgall on: 6/27/2012 [Member] Starter | Points: 25

Up
0
Down
Use ispostback event to stop resetting of control values

Thanks and Regards,

Vinay Gandhi
www.quadtechindia.com

hareeshkumarkr-16190, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ajay.Kalol on: 6/28/2012 [Member] Starter | Points: 25

Up
0
Down


Use Page.isPostback for that.

in Pageload event

if(!isPostback){  

bindDDL();
bindCBList();
}


it will resolve your Problem

Ajay
ajaypatelfromsanthal.blogspot.in

hareeshkumarkr-16190, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 6/29/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Hi,


    protected void Page_Load(object sender, EventArgs e)

{
if (!Page.IsPostBack)
{
BindDropDownList();
OR Other Code
}
}


hareeshkumarkr-16190, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response