Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Below is the Code Snippet. I have a Detail View which is populated on selecting two Dropdownlist, I have converted the required Field to Template and then Changed from Text Box to Drop down list with Data bounded. Now when I edit the Detail View and Select a item from Dropdownlist and click on Submit it is not updated to DB, instead a blank value is stored in DB. Please Help.


C#
<EditItemTemplate>
                        <asp:DropDownList ID="DropDownList2" runat="server" AppendDataBoundItems="true" 
                            DataSourceID="AccessDataSource5" DataTextField='<%# Bind("Project_or_Track") %>'  
                            DataValueField="DropDown" >
                        </asp:DropDownList>
                    </EditItemTemplate>
Posted
Comments
Christian Graus 19-Jun-13 2:17am    
I always find when you expect things to happen by magic, they often don't. If you were to write actual database code, you'd have more control here.
Member 4475977 19-Jun-13 5:12am    
Code is always Option, but if you have a solution to this problem, Post it.

1 solution

You have to define an update query on your Datasource which will update the database.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900