Click here to Skip to main content
11,931,104 members (58,288 online)
Rate this:
Please Sign up or sign in to vote.
I have one form containing dropdownlist with 4 values in it fetching from database and have one button.
now on page load i have written coding for fetching data in dropdownlist and i am getting that and i select one value from it but when i click on button for "additional functionality" on it then dropdownlist also get refreshed(the value i selected is replaced by first value in dropdownlist...i tried of autopostback on button and too on dropdownlist but had no affect
.how can i stop this
pls tell
Posted 7-Feb-13 1:29am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


I guess you are loading your dropdown in all the pageloads, irrespective of whether its a post back or not.
You can load your dropdown only if its a initial page load and not a post back.

//then your code here

Hope this helps.
shivani 2013 7-Feb-13 7:42am
thanks.i have one more issue that i want when i click on particular item of i want its product cost should come in a given textbox .i am not able to achieve through ddlprd_selectedindexchange but same i can achieve on clicking button...y so can i achieve through ddlprd_selectedindexchange ?
pls tell
manognya kota 7-Feb-13 9:12am
Once you fix this problem, you should be able to get the selected item in your index change.Can you post your code for the button click and the selected index change?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100