protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
using (StreamReader stRead = new StreamReader(Server.MapPath("File/TextFile.txt")))
{
int i = 0;
string name = string.Empty;
string valueFromtoEnd = string.Empty;
while (!stRead.EndOfStream)
{
if (i > 2 && i <= 4)
{
valueFromtoEnd += stRead.ReadLine();
}
else
{
name += stRead.ReadLine();
}
i++;
if (i > 4)
{
break;
}
}
}
}
}
It will read the line from 3 to 4