J
Jon Paal
--dropdownlist value isn't being saved to database from FORMVIEW
--field PriorityID is datatype "number" (integer)
what's missing ????
'=========code=============
<asp:Content ID="Content1" ContentPlaceHolderID="PageContentPlaceHolder" runat="Server">
<asp:AccessDataSource id="DataSource1" Runat="Server"
DataFile="~/APP_Data/db1.mdb"
InsertCommand="INSERT INTO MyList (PriorityID) VALUES (@PriorityID);">
<InsertParameters>
<asparameter Name="PriorityID" Type="int32" />
</InsertParameters>
</asp:AccessDataSource>
<asp:FormView id="FormView1" Runat="Server"
DataKeyNames="id"
DataSourceID="DataSource1"
DefaultMode="Insert">
<InsertItemTemplate>
<table id="AddTable" >
<tr>
<td><aspropDownList id="PriorityID" Runat="Server">
<asp:ListItem Text="-- Select Category --" Value="-1"> </asp:ListItem>
<asp:ListItem Text="-2" Value="-2"> </asp:ListItem>
<asp:ListItem Text="-3" Value="-3"> </asp:ListItem>
</aspropDownList>
</td>
</tr> <tr>
<td class="buttons">
<asp:Button id="InsertButton" CommandName="Insert" Text="Insert"
Font-Size="9pt" Width="50" Runat="Server"/>
</td>
</tr>
</table>
</InsertItemTemplate>
</asp:FormView>
</asp:content>
--field PriorityID is datatype "number" (integer)
what's missing ????
'=========code=============
<asp:Content ID="Content1" ContentPlaceHolderID="PageContentPlaceHolder" runat="Server">
<asp:AccessDataSource id="DataSource1" Runat="Server"
DataFile="~/APP_Data/db1.mdb"
InsertCommand="INSERT INTO MyList (PriorityID) VALUES (@PriorityID);">
<InsertParameters>
<asparameter Name="PriorityID" Type="int32" />
</InsertParameters>
</asp:AccessDataSource>
<asp:FormView id="FormView1" Runat="Server"
DataKeyNames="id"
DataSourceID="DataSource1"
DefaultMode="Insert">
<InsertItemTemplate>
<table id="AddTable" >
<tr>
<td><aspropDownList id="PriorityID" Runat="Server">
<asp:ListItem Text="-- Select Category --" Value="-1"> </asp:ListItem>
<asp:ListItem Text="-2" Value="-2"> </asp:ListItem>
<asp:ListItem Text="-3" Value="-3"> </asp:ListItem>
</aspropDownList>
</td>
</tr> <tr>
<td class="buttons">
<asp:Button id="InsertButton" CommandName="Insert" Text="Insert"
Font-Size="9pt" Width="50" Runat="Server"/>
</td>
</tr>
</table>
</InsertItemTemplate>
</asp:FormView>
</asp:content>