How to stop the page refresh when i am performing the oncange event on the dropdown list in asp.net

Posted by Ravinderk under ASP.NET on 8/21/2012 | Points: 10 | Views : 13693 | Status : [Member] | Replies : 7
I have few textboxes and one dropdown list . And am performing the onChange event on this drop down list, but it is refreshing the page, It should not why because while refreshing the page am loosing the previous text box values which we entered to submit and save into the database. It should not happen.


Thanks
ravi




Responses

Posted by: Gopesh9 on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down
Disable the PostBack property of the Dropdown list, then it will not refresh the page every time you perform the onChange event in the dropdownlist...


G. S.
.Net Developer

Ravinderk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ravinderk on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down
Thanks for reply, but still it refreshing the page, I am loosing the data of text boxes.

Ravinderk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gopesh9 on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down
Could you please post your code...

G. S.
.Net Developer

Ravinderk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nadh123 on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down
autopostback=false..............

Mahendra
91-9908699686

Ravinderk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Srilu.Nayini577 on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down
Use ajax or autopostback property of dropdownlist set to false.

SRILATHA
.Net Developer

Ravinderk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ravinderk on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down
Can you explan in details by giving sample example...

thanks,
ravi

Ravinderk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Eni on: 8/22/2012 [Member] Starter | Points: 25

Up
0
Down
hi,

Give AutoPostBack Property as False..

with regards,
eni.

Ravinderk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response