argumentoutofrangeexception was unhandled by user code asp net
Actually my code is this ,am getting this error for substring .
here am writing my code this error.
try
{
if (tbMeterID.Text == "")
return;
if (tbMeterID.Text.Substring(4, 1) == "E")
{
//do some thing
}
}
am change the code as below.
am solved this prob like this way.
if (tbMeterID.Text != "")
{
bool meter = tbMeterID.Text.Substring(4, 1).Equals("E");
this.radBusyIndicator.IsBusy = false;
if (e.Result.routeID == null)
return;
if (meter == true)
{
//do something
}
}
here am writing my code this error.
try
{
if (tbMeterID.Text == "")
return;
if (tbMeterID.Text.Substring(4, 1) == "E")
{
//do some thing
}
}
am change the code as below.
am solved this prob like this way.
if (tbMeterID.Text != "")
{
bool meter = tbMeterID.Text.Substring(4, 1).Equals("E");
this.radBusyIndicator.IsBusy = false;
if (e.Result.routeID == null)
return;
if (meter == true)
{
//do something
}
}
Comments