Update From DropDownList in DetailView

R

Randy

Here is the issue and maybe someone can shed some light on this, since
I have been searching all day... I have an Unbound DropDownList that is
in the edit template of a Bound detailview. No matter what I have
tried I can not get the Dropdownlist value to update into the
database.. I'm sure this has something to do with the finding the
control (DDL) in the detailview, but no luck to this point. Any help
would be great.

Thanks...


--Randy

Code snipits as follows:

<asp:SqlDataSource ID="DSDetail" runat="server" ConnectionString="<%$
ConnectionStrings:ACChangeLogConnectionString %>"
SelectCommand="Logdetails"
SelectCommandType="StoredProcedure" UpdateCommand="UPDATE ACChange SET
acTable = @acTable, Change = @Change, acMandatory = @acMandatory WHERE
(UID = @UID)">
<UpdateParameters>
<asp:parameter Name="acTable" />
<asp:parameter Name="Change" />
<asp:parameter Name="acMandatory" />

<asp:parameter Name="UID" />
</UpdateParameters>
............
<asp:DetailsView ID="DVLog" runat="server" AutoGenerateRows="False"
CellPadding="4"
DataSourceID="DSDetail" ForeColor="#333333"
GridLines="None" Height="50px"
Width="694px" DataKeyNames="UID">
.........
<EditItemTemplate>
<asp:DropDownList ID="acMandatory"
SelectValue='<%# Eval("acMandatory") %>' runat="server">
<asp:ListItem Text="Yes"
Value="Yes" />
<asp:ListItem Text="No"
Value="No" />
</asp:DropDownList>

</EditItemTemplate>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top