Index (zero based) must be greater than or equal to zero Index (zero based) must be greater than or equal to zero asp.net asp.net

Index (zero based) must be greater than or equal to zero


Your second String.Format uses {2} as a placeholder but you're only passing in one argument, so you should use {0} instead.

Change this:

String.Format("{2}", reader.GetString(0));

To this:

String.Format("{0}", reader.GetString(2));


In this line:

Aboutme.Text = String.Format("{2}", reader.GetString(0));

The token {2} is invalid because you only have one item in the parms. Use this instead:

Aboutme.Text = String.Format("{0}", reader.GetString(0));


Change this line:

Aboutme.Text = String.Format("{0}", reader.GetString(0));