Regex to identify asp.net server control in a given html

  • Thread starter Thread starter John
  • Start date Start date
J

John

I am not sure if it is the right forum for Regex topic. If not, please point
me the right forum.
For a given HTML, I need to identify each asp.net server control. I am not
an expert in regex, can someone give me a hint to write it?

In the HTML, I need to identity the patterns for
<tag * runat="server" * />
or <tag * runat="server" * > * </tag>
In which tag is in the pattern of *:*

Then I need to get the start index and end index of the string that match
the pattern.
Thank you very much for your help!
 
You can loop thorugh the controls in the codebehind
controls.count
Why are you searching the page in html. Are you stealing somebody elses
page?
 
I need to analyse a ascx file, get all the server control, as well as
getting none server control tags into literal controls. It has nothing to do
stealing other pages. It is my own project. Thanks.
 
Ok my question then is why are you doing by searhing the html. Why not use
the code behind to see what controls are on the page
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top