Visual Studio .NET - How to create editable dropdown list using asp.net 2.0
Asked By anitha satish on 07-Oct-07 11:14 AM
Hi Friends,
How to create editable dropdown list using asp.net 2.0 and vb.net.
Regards,
Satish.
A dropdownlist by itself cannot be made
Peter Bromberg replied to anitha satish on 07-Oct-07 11:22 AM
editable. What most developers do is put a textbox above the dropdownlist and use this to add items to it.
create editable dropdown list using asp.net 2.0
Anup Kumar replied to anitha satish on 22-Oct-07 02:25 AM
a simple way for editable DropDownList
hamit yıldırım replied to anitha satish on 26-May-08 08:37 AM
using
System;
using
System.Data;
using
System.Configuration;
using
System.Collections;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Web.UI.HtmlControls;
public
partial class _Default : System.Web.UI.Page
{
int index = 0;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ddlHandlerRouteName_SelectedIndexChanged(object sender, EventArgs e)
{
this.TextBox1.Text = "";
this.dropdown.Visible = false;
this.TextBox1.Visible = true;
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
this.dropdown.Items.Add(this.TextBox1.Text.Trim());
for (int i = 0; i < this.dropdown.Items.Count; i++)
{
if (dropdown.Items[i].Text == this.TextBox1.Text)
{
index = i;
}
}
this.dropdown.SelectedIndex = index;
this.dropdown.Visible = true;
this.TextBox1.Visible = false;
}
}
if is there a way for Editable DropDownList without writing much code tell me pls.