Posted on: 4/14/2014 9:20:28 PM | Views : 400

Hi ,
in my application dropdownlist selected value saves in database  and  want to retrieve same value from db two things  in my app.both are working but  in retrieving case it shows already saved value and dropdownlist option value.but i want to show only saved value and remaining options but not duplicate database values.Below is my code.
SqlCommand cmd = new SqlCommand("select InvoiceStatus from ScheduledTasks where ID=@ID", cn); ddlInvoiceStatus.SelectedItem.Text = dr["InvoiceStatus"].ToString(); <asp:DropDownList ID="ddlInvoiceStatus" AutoPostBack ="true" runat="server" ><asp:ListItem>Select</asp:ListItem> <asp:ListItem>Schedule</asp:ListItem> <asp:ListItem>In Process</asp:ListItem> <asp:ListItem> Complete</asp:Li ...

Go to the complete details ...