locked
How to get the line numbers of an aps.net web page from a Visual Studio addin RRS feed

  • Question

  • Hi,

    I'm currently working on a VS addin which runs on asp.net websites. My ultimate tasks is extracting asp.net page source where i can identify tags, controls, values etc and create an xml file for another process. I also want to know the line numbers of each code that i extracted. 

    for an example

    1.	<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
    2.	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3.	<html xmlns="http://www.w3.org/1999/xhtml">
    4.	<head runat="server">
    5.	<title>untitled</title>
    6.	</head>
    7.	<body>
    8.	<form id="form1" runat="server">
    9.	<div>
    10.	<h1>This is a sample webpage to demonstrate the Usability Add-in</h1>
    11.	<p>
    12.	</p>
    13.	</div>
    14.	</form>
    15.	</body>
    16.	</html>
    let's say i want to get the values in <h1> tags
    10.	<h1>This is a sample webpage to demonstrate the Usability Add-in</h1>
    My task is to get line number as well. how i can i achieve this task using an add-in pro grammatically? It will be a great help if someone can give me a clue 


    Friday, July 5, 2013 5:57 PM

Answers