string filestring = File.ReadAllText(@"C:\\Documents and Settings\\EGC\\Desktop\\ontofin1.txt");
Dictionary<string, int> words = new Dictionary<string, int>();
string[] split = filestring.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string word in split)
{
if (words.ContainsKey(word))
{
words[word]++;
}
else
words.Add(word, 1);
}
foreach (KeyValuePair<string, int> pair in words)
{
//Console.WriteLine(pair.Key + " = " + pair.Value);
string ss = pair.Key + "=" + pair.Value;
//TextBox2.Text = ss;
//MessageBox.Show("" + ss);
Response.Write(ss);
Response.Write(",");
Response.Write("</br>");
.......................................................................................................................................
The above code is used not displaying full content of words..
what i have do means the content to be spilitted into words separated by space and the words are counted by how many times the words occurred in this context and i want to display the content into textbox but it cannot be display and last word only display.. but, response.write statement print all words.. plz, solve the error..
Thank u...