Manipulating HTML Output of Placeholder and Child Controls

T

Thomas Bandt

Hi all.

I am filling some stuff into a PlaceHolder Control in my
WebForm, i.e. UserControls and WebControls. So far so good.

Now I want to manipulate the HTML output of this control
and its child controls. I want to parse the HTML code for
hyperlinks by regular expressions to extract them and
display them seperately in a print mode of a webpage
(as you can see it on
http://www.heise.de/english/newsticker/news/print/69361
(scroll down)).

I know a solution for parsing the whole output by a
HttpModule, but I don't want to parse all the contents.

So, how can I do this?

To simplify it - the challange is to change the Text of

Literal text = new Literal();
text.Text = "Hallo";
PH.Controls.Add(text);

without touching the Text property of the Control
before sending it to the client ;-)

Regards, Thomas
http://blog.thomasbandt.de/
 
S

Sonu Kapoor

Find the HTML in PreRender and manipulate it the way you need it.

Sonu Kapoor [MVP]
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top