Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 19th, 2005, 09:01 AM
Authorized User
 
Join Date: Apr 2005
Location: , , United Kingdom.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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...
thanks


  #2 (permalink)  
Old August 19th, 2005, 11:13 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Use the add method of the page:

Me.FindControl("Form1").Controls.Add(myControl)

  #3 (permalink)  
Old August 22nd, 2005, 02:59 AM
Authorized User
 
Join Date: Apr 2005
Location: , , United Kingdom.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

  #4 (permalink)  
Old August 22nd, 2005, 09:20 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple String Replace berna_isct XSLT 5 May 20th, 2008 02:47 AM
Help in instruction string-replace hugoscp XML 9 October 20th, 2006 12:07 PM
replace string value str33ts XSLT 1 April 22nd, 2005 04:01 AM
how to replace a string with another string/number crmpicco Javascript How-To 4 March 14th, 2005 12:59 PM
String.replace() method JohnD Javascript 0 August 20th, 2004 06:46 AM



All times are GMT -4. The time now is 12:22 PM.


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