p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Professional (http://p2p.wrox.com/forumdisplay.php?f=57)
-   -   Replace string with a control (http://p2p.wrox.com/showthread.php?t=32676)

shenku August 19th, 2005 09:01 AM

Replace string with a control
If I have an HTML string, like "<HTML><BODY><CONTROL:ADD/></BODY></HTML>"

and I wanted to find the "<CONTROL:ADD/>" and replace it (At runtime) with an actual control, how would I do that?

The end idea is to have the HTML displayed to the page of course...

jbenson001 August 19th, 2005 11:13 PM

Use the add method of the page:


shenku August 22nd, 2005 02:59 AM

HI thanks,

The only thing is that I cant add it directly to the page because it has to come in that specific place in the string so tecnically I have to "add it to the string" in a sence then add it all at once to the page. I also cant just add the first part of the string to the page then add the control then carry on, because there may be another control to be added before that one in the string...

Am I making sence?

jbenson001 August 22nd, 2005 09:20 AM

That is a difficult requirement. I would place a table on the page, and then add controls to it depending on where you neede them.

All times are GMT -4. The time now is 07:36 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.