Hi friends,
I have a problem suppose I have a textbox, I want when I enter any text in it and press enter, the textbox become dropdownlist that contain that text. In this way the items in the dropdown list will be entered at run time by the textbox associated with it. How can it possible.
Loading


Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Oct 8, 2012, 9:43 PM EDT
Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 8, 2012, 11:26 PM EDT
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WebApplication3
{
public partial class _Default : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
DropDownList1.Items.Add(TextBox1.Text);
DropDownList1.Visible = true;
TextBox1.Visible = false;
}
protected void Page_Load(object sender, EventArgs e)
{
DropDownList1.Visible = false;
}
}
}
Richa GargRank #228 · 10.8K reputationPosted Oct 9, 2012, 12:08 AM EDT
No I am not saying this, actually I saw an example from http://www.typescriptlang.org/Samples/ site. In this see the sample of TodoMVC, and then tell me Is this possible In asp.net. If yes then how?
Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Oct 9, 2012, 12:36 AM EDT
http://www.dotnetcurry.com/ShowArticle.aspx?ID=515
http://www.codeproject.com/Articles/365974/Autocomplete-Menu