Thanks in advance.
<asp:DropDownListID="DDDept"runat="server"AutoPostBack="True" DataSourceID="ObjectDataSource1"DataTextField="DeptName"DataValueField="DeptID"Style="z-index: 112; left: 372px;position: absolute; top: 415px"Width="159px"></asp:DropDownList>
SO you have your datasource all set up and the drop down list displays the departments correctly. However you want the users current department to be selected..
use the SelectedValue Property of the drop down list and set it to whatever key field in the users table that has the department id in it.
<asp:DropDownList SelectedValue='<# Bind("DepartmentIdFieldFromUsersTable") %>' .../>
should do it.
hth,
mcm
Hi, Thank you so much for the help!! I can see the department correctly now !!
0 comments:
Post a Comment