1
Reply

i want to select those value is gave by user from textbox

Amit Kumar

Amit Kumar

Jul 28 2016 7:25 AM
244
protected void btn2_Click(object sender, EventArgs e)
{
string man = txt2.Text;
string[] match = man.Split(',');
int i = match.Length;
for (int count = 0; count < i; count++)
{
var a = ltb1.Items.FindByText(match[i].ToString());
if (a.Text == man)
{
ltb1.SelectedValue = a.Value;
}

Answers (1)