Hi i am working on a c# applcation
what it does basically is get specific tags and checks their contents.
My problem lies here, if one of the tags contents isnt correct i need to show the line of code where the tag resides in the html source code.
Can someone help please...

simple actually.
Assuming you are parsing the text file character by character, set a variable to zero first, and increment it whenever you hit a newline indicator.

Here is the C# code:

int errline = 0;
private void Parse(string html){
  int c;
  while(c < html.Length){
    if (html.SubString(c, 1) == Environment.NewLine){
      errLine++;
    }
  }
}

//On error:
MessageBox.Show("Error on Line " + errLine.ToString());

HTH.

woops, that variable needs to start at 1, so its

int errLine= 1;

that is the current position of the character you are reading in the string.