Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6563489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:51:29+00:00 2026-05-25T13:51:29+00:00

So here’s the problem I am writing a program that is going to look

  • 0

So here’s the problem I am writing a program that is going to look through the folder on the localhost before it is rendered. I want to be able to get the value of the ID of a web element and store that in a list object.

For example I have a page:

<html>
<body>

<CustomControl:MyPhoneValidationControl ID="PhoneValidator" validationgroup="PageValidation" />

<CustomControl:MyEmailValidationControl ID="EmailValidator" validationgroup="PageValidation" />

</body>
</html>

The program will go to C:\WebFolder\Page.aspx and then will read the file and find every CustomControl on the page and then grab the Control Type (MyPhoneValidationControl OR MyEmailValidationControl) and then assign the value of the ID (PhoneValidator, EmailValidator) as a property of the Control object.

I am using C#.NET 4.0. Getting the ID of the element is easy after the page is rendered but it doesn’t show that it is a custom control. To see the custom control you need to look at the .aspx file without it being rendered by a web server (IIS, etc.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:51:29+00:00Added an answer on May 25, 2026 at 1:51 pm

    I resolved myself this by stuffing the page data into a string and then using

    string page = new StreamReader(page).ReadToEnd();
    List<string> control = new List(string)();
    MatchCollection matchControl = Regex.Matches(text, "expression");
    foreach (Match match in matchControl)
    {
      control.Add(match.Value)
    }
    

    This catches the control to a list and then I can parse the string list to get the type and ID using Regex in the properties after passing the whole control List to the controls constructor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's a coding problem for those that like this kind of thing. Let's see
Here is the scenario: I'm writing an app that will watch for any changes
Here's my search array: $aExt = array('png','jpg','gif'); I want to search through the variable:
Here is another spoj problem that asks how to find the number of distinct
Here's the problem....I have three components...A Page that contains a User Control and a
Here's the situation, i want to have a user that can enter time on
Here is my problem...I have a page that loads a list of clients and
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here's a problem I ran into recently. I have attributes strings of the form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.