473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Manipulating HTML Output of Placeholder and Child Controls

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/
Feb 8 '06 #1
2 1545
Find the HTML in PreRender and manipulate it the way you need it.

Sonu Kapoor [MVP]
---
Posted via www.DotNetSlackers.com
Feb 9 '06 #2
Sonu Kapoor schrieb:
Find the HTML in PreRender and manipulate it the way you need it.


First class answer! Thank you very much.

And how, please???

Thomas
Feb 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Barb Alderton | last post by:
I am working with SharePoint 2003. I am using an existing webpart as a child control (server control). I need to access/manipulate the HTML that the control outputs prior to rendering it to the...
2
by: John | last post by:
Hi all, How do I iterate through a specific placeholder and remove or hide all controls contained within that placeholder? Regards John.
4
by: Ron Vecchi | last post by:
In the RenderControl() method I have some code which will catch the controls HTML output. But what I'm tring to accomplish is catching only a perticular control and its child controls. The code...
2
by: Brett Robichaud | last post by:
I'm trying to create a Page class that I derive all others from. This page class will look for an asp:placeholder and insert some html at that point. I can see how I can create new HTML controls...
3
by: Simon Harvey | last post by:
Hi All I am making a particular asp.net page using the codebehind method. What I need to do is write out html in the code behind into a specific place in the page. Somewhat like the way Servlets...
1
by: Angel | last post by:
I have added controls to the placeholder control. All the controls that were added have EnableViewState = true including the placeholder. One of the controls has a button that performs a postback. My...
1
by: msnews.microsoft.com | last post by:
I'm adding multiple web controls to the placeholder controls collection, but even when doing the for each and recursion method of getting the web controls, I'm only getting the first web control...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
1
by: John | last post by:
I am trying to get a control to insert into the HTML content for a page which comes from our database. At the point I have a tag for the component I want to add which is contained inside the HTML....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.