Now I am going to build an application in windows Forms Application regarding with the Key Value pair in which in textbox1 client enters the command & its related value should be printed in another textbox2 on clicking a button.
I want the solution in the Windows Forms Applications & also in redirecting between ASP Webpages also(ie in ASP.Net)
Here below is the code generated by me.
I want the solution as soon as possible.
Loading

Deepak SharmaRank #541 · 4.5K reputationPosted Feb 6, 2012, 11:57 PM EST
private void button1_Click(object sender, EventArgs e)
{
string key=string.Empty;
string[] lines = File.ReadAllLines(@"C:\SUBS\FileReadKeyPairForms\FileReadKeyPairForms\TVFUN.txt");
Hashtable htable = new Hashtable();
foreach (string line in lines)
{
string[] items = line.Split('=');
htable.Add(items[0], int.Parse(items[1]));
}
//while (true)
//{
//textBox1.Text = Console.ReadLine();
if (htable.ContainsKey(textBox1.Text))
{
textBox2.Text = htable[textBox1.Text].ToString();
}
else
{
MessageBox.Show("Invalid Key Entered");
}
//}
}
Its not clear what you want in ASP.NET
Aditya Varma Mudunuri56 reputationPosted Feb 7, 2012, 12:50 AM EST
"Unable to copy file "obj\x86\Debug\FileReadKeyPairForms.exe" to "bin\Debug\FileReadKeyPairForms.exe". The process cannot access the file 'bin\Debug\FileReadKeyPairForms.exe' because it is being used by another process."
What does it mean by this?
Aditya Varma Mudunuri56 reputationPosted Feb 7, 2012, 8:15 PM EST
Deepak SharmaRank #541 · 4.5K reputationPosted Feb 7, 2012, 8:23 PM EST
See the first answer of the following link
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressinstall/thread/ed4d25c8-ffe9-4163-8c8a-053f62455673