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 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Khan Abrar AhmedPosted Aug 13, 2014, 7:07 AM
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