hello..
i have dropdown for displaying name...this name is fetched from database..since i have more than 300 name..it is difficult to select name on user wish...
for example....when i click on dropdownlist and type 'm', list of name started with 'm' will show. Does anyone know how to do this?
//at the frontend
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lbl_approve" runat="server" Text="APPROVAL BY :"></asp:Label></asp:TableCell><asp:TableCell>
<asp:DropDownList ID="dd_approve" runat="server" Width="300px" >
</asp:DropDownList>
</asp:TableCell>
</asp:TableRow>
//at the backend
protected void loadapprove()
{
string connectionString = ConfigurationManager.ConnectionStrings["ConnectionISG_Trainee"].ConnectionString;
using (OracleConnection connection = new OracleConnection())
{
connection.ConnectionString = connectionString;
connection.Open();
Console.WriteLine("State: {0}", connection.State);
Console.WriteLine("ConnectionString: {0}", connection.ConnectionString);
OracleCommand command1 = connection.CreateCommand();
string staff = "select per_empcode, per_empname||'-'||per_empcode staffno from adm.edbdpersonnel order by per_empname";
OracleDataAdapter adap1 = new OracleDataAdapter(staff, connection);
DataTable ds1 = new DataTable();
adap1.Fill(ds1);
dd_approve.DataSource = ds1;
dd_approve.DataTextField = "staffno";
dd_approve.DataValueField = "per_empcode";
dd_approve.DataBind();
dd_approve.Items.Insert(0, new ListItem("--Select--", ""));
connection.Close();
}
}