sparky0904
IS-IT--Management
Hi,
i have a page using a repeater that lists 2 Combo boxes for each record on the repeated. I need to retrieve the value of the combo boxes when the save button is clicked for each record and push back into database.
Idea was to name each control uniquely with the ID of the record and then retrieve the value at server side to then fire a routine to push the results into a database.
In the page the comobobox has an ID of KnowledgeScore, using the itembound event i have added the ID of the record to the end of the ID so it know looks like KnowledgeScore-1, knowledgeScore-42, etc. Checking the source code of the HTML page once loaded i can see that each combobox has a unique ID.
I have a save button and in the click event i try to loop through the controls on the page and pick out those that have a type of dropdownlist, however the ID is that i have entered at design time and also the value of each comobo box is set to the first record as if the data has been lost.
I have the dropdownlists set to runat="Server".
Is this anything to do with postback data??
Can i do what i want to do??
i have a page using a repeater that lists 2 Combo boxes for each record on the repeated. I need to retrieve the value of the combo boxes when the save button is clicked for each record and push back into database.
Idea was to name each control uniquely with the ID of the record and then retrieve the value at server side to then fire a routine to push the results into a database.
In the page the comobobox has an ID of KnowledgeScore, using the itembound event i have added the ID of the record to the end of the ID so it know looks like KnowledgeScore-1, knowledgeScore-42, etc. Checking the source code of the HTML page once loaded i can see that each combobox has a unique ID.
I have a save button and in the click event i try to loop through the controls on the page and pick out those that have a type of dropdownlist, however the ID is that i have entered at design time and also the value of each comobo box is set to the first record as if the data has been lost.
I have the dropdownlists set to runat="Server".
Is this anything to do with postback data??
Can i do what i want to do??