I am using asp.net with c#.
I have a dropdown. each item in dropdown has six characters(AUDUSE,USDASD etc.). i want that when user select any item in the dropdown so three characters are assigned to one string and three to other(string a=AUD,string b=USE etc). how is it possible.
Dividing string and assing it to two strings
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Blocked AccountRank #403 · 6.2K reputationPosted Jul 26, 2011, 3:56 AM EDT
If the length is fix as you said in your post.
Then you can try this for a quick solution.
protected void DropDownListNumber_SelectedIndexChanged(object sender, EventArgs e)
{
string a = DropDownListNumber.SelectedItem.Text.Substring(0,3);
string b = DropDownListNumber.SelectedItem.Text.Substring(3, 3);
}
Zoran HorvatRank #792 · 2.9K reputationPosted Jul 26, 2011, 3:54 AM EDT
stirng a = tmp.Substring(0, 3);
string b = tmp.Substring(3);