s = txt.Text.ToUpper();
n=s.Length;
for (int i = 0; i
{
s = s[i].ToString();
lbl.Text = s;
Response.Write(lbl.Text);
Response.Write("\n");
txt.text="answer"(I am giving)
i am getting index was outside the bounds of the array
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Khan Abrar AhmedRank #778 · 3K reputationPosted Aug 13, 2014, 3:07 AM EDT
s = txt.Text.ToUpper();
n=s.Length;
for (int i = 0; i
//s= s[i].ToString(); -- your error is here becuse you are assignig the value again
string a = s[i].ToString();
lbl.Text = a;
Response.Write(lbl.Text);
Response.Write("\n");
}
Please mark as answer if it help you