This is a discussion on DetailsView, inserting data from dropdown within the ASP and ASP.NET Programming forums, part of the Web Development category; <asp:TemplateField> <InsertItemTemplate> <aspropDownList ID="Status" runat="Server" > <asp:...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| <asp:TemplateField> <InsertItemTemplate> <asp ropDownList ID="Status" runat="Server" ><asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> </asp ropDownList></InsertItemTemplate>
__________________ The MOSS Master of Solution Service |
| Sponsored Links |
| |||
| You can add the control parameter to the InsertParemeters. <InsertParameters> <asp:ControlParameter ControlID ="status" Name ="DepartmentName" PropertyName="SelectedText" /> |
| |||
| You can use SelectedValue |
| |||
| <asp etailsView ID="GridView1" CssClass="table1" DefaultMode="ReadOnly" DataKeyNames="id"Width="60%" OnItemCreated="GridView1_ItemCreated" AutoGenerateRows="False" runat="server" DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True"> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle CssClass="fontlbln" BackColor="#EFF3FB" /> <EditRowStyle BackColor="AliceBlue" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="White" /> <CommandRowStyle HorizontalAlign="Center" BackColor="#D1DDF1" Font-Bold="True" /> <Fields> <asp:BoundField DataField="Uname" HeaderText="Username" SortExpression="Uname" /> <asp:BoundField DataField="Pwd" HeaderText="Password" SortExpression="Pwd" /> <asp:BoundField DataField="Addr" HeaderText="Address" SortExpression="Addr" /> <asp:CheckBoxField DataField="status" HeaderText="Active" SortExpression="status" /> <asp:CommandField EditText="Edit" NewText="Add" DeleteText="Delete" InsertText="Submit" ShowInsertButton="True" ShowEditButton="True" ShowDeleteButton="true"> <ControlStyle CssClass="fontlbl" /> </asp:CommandField> </Fields> <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="False" /> </asp etailsView><asp:SqlDataSource ID="SqlDataSource1" SelectCommand="Sp_getalladmin" SelectCommandType="StoredProcedure" UpdateCommand="sp_update" UpdateCommandType="StoredProcedure" InsertCommand="sp_insert" InsertCommandType="StoredProcedure" DeleteCommand="sp_delete" DeleteCommandType="StoredProcedure " ConnectionString="<%$ConnectionStrings:Conn%>" runat="server"> <UpdateParameters> <asp:Parameter Name="Uname" Type="String" /> <asp:Parameter Name="pwd" Type="String" /> <asp:Parameter Name="Status" Type="String" /> <asp:Parameter Name="Addr" Type="String" /> <asp:Parameter Name="id" Type="int64" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="Uname" Type="String" /> <asp:Parameter Name="pwd" Type="String" /> <asp:Parameter Name="Status" Type="String" /> <asp:Parameter Name="Addr" Type="String" /> </InsertParameters> <DeleteParameters> <asp:Parameter Name="id" Type="Int64" /> </DeleteParameters> </asp:SqlDataSource>
__________________ The MOSS Master of Solution Service |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Inserting value to dropdownlistbox | Kirubhananth | ASP and ASP.NET Programming | 3 | 02-24-2008 09:44 PM |
| inserting into table | ramesh123 | ASP and ASP.NET Programming | 1 | 02-14-2008 08:31 PM |
| Inserting An Array Into A Database using PHP | Sabari | PHP Programming | 3 | 12-18-2007 06:37 AM |
| example of Inserting and Retrieving data from xml file | hanusoft | ASP and ASP.NET Programming | 1 | 11-12-2007 05:13 AM |
| How can I refer to a dropdown select box that has a non alphanumeric name? | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 10-17-2007 08:18 AM |