hello frndz..
i really need some urgent help on a simple problem.
im storing a string in a database, say its "1 2 3",these are actually the id's of something. in order to get the name from the ID, i need to seperate the id's from the string, that is 1,2,3. in a array may b. so i just want to know how i can achieve the same thing.
i tried this code, but its not working properly.
str = TextBox1.Text.Trim();
temp = str;
for (int j = 0; j < str.Length; j++)
{
if (str.Contains(" "))
{
i = str.IndexOf(" ");
str=str.Substring(i, str.Length - (i+1));
Response.Write(" This is index "+i);
Response.Write(" This is next string : "+str);
}
}
hope to get a help soon..
thanks..