0

I have aspx page which may controls. I want get all controls of aspx page without running into browser. Means by taking physical path, I want to get list of all controls from aspx.

for example - I have following aspx page and I want to get all controls(textbox and label) and their attributes.

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" 
CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

</asp:Content>
m.k.sharma
  • 155
  • 1
  • 2
  • 12
  • thank you. I think, we need load page as per said in link. Anyway I try to load aspx in file stream and then read all the control property. – m.k.sharma Mar 09 '21 at 07:19
  • Do you want to write code to read `.aspx` file and then read the controls? For that you can refer https://stackoverflow.com/questions/846994/how-to-use-html-agility-pack – शेखर Mar 09 '21 at 07:23

0 Answers0