473,385 Members | 1,326 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,385 software developers and data experts.

Dynamically changing HTML in page beofore output to user

Hi Guys.
I have a problem, and for some reason I have not been able to find an
answer on the net.
In a nutshell, I have some codes on my page, which I want to change to
an appropriate string (from a hashtable). Since I do not want to pass
this hashtable to a function all the time I encounter it on the page, I
want to do it once, in one function. Just capture HTML before rendering
the page, and then replace codes with my strings.
Any ideas would be appreciated.
Alex

Mar 14 '06 #1
2 1552
The Render event builds the page by assembling the HTML for output to the
browser. The page collects the HTML from each control in the hierarchy for
delivery. When the Render event is overridden, you can write custom HTML to
the browser that changes all or part of the HTML the page has created thus
far.It takes an HtmlTextWriter object as a parameter and uses that to output
HTML to be streamed to the browser. Changes can still be made at this point.

If you have your "codes" in certain controls on the page, it would probably
be a lot easier to modify these based on your Hashtable either in PreRender,
or you can even do it in Page_Load.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"gr*****@gmail.com" wrote:
Hi Guys.
I have a problem, and for some reason I have not been able to find an
answer on the net.
In a nutshell, I have some codes on my page, which I want to change to
an appropriate string (from a hashtable). Since I do not want to pass
this hashtable to a function all the time I encounter it on the page, I
want to do it once, in one function. Just capture HTML before rendering
the page, and then replace codes with my strings.
Any ideas would be appreciated.
Alex

Mar 14 '06 #2
Thanks, I think I have found the solution. It is partial, but with
amlittle work, it'll be good for all cases.
Thanks for the reply, though :)

Mar 15 '06 #3

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

Similar topics

1
by: Vince C. | last post by:
Hi all, I've created XML documents that are described with a schema. I'm using those documents to create web pages. All my web pages contain a fixed header and a variable document part. The...
1
by: Earl Teigrob | last post by:
PROBLEM: When a user control is loaded into a PlaceHolder control more than once, the events do not fire on the first click of a control on the dynamically loaded user control. In other words, the...
7
by: Ryan Taylor | last post by:
Hi. I have some code that dynamically generates a PDF and spits this content directly to the web browser. I use HTMLDoc to create the Pdf's from html. So the user can click on a button "Print...
2
by: Web Team | last post by:
Hi All, I'm in the process of writing a eich text editor web custom control. The actual text/HTML is displayed/editied in a DIV layer, which I have created like this: output.Write("<span...
2
by: tshad | last post by:
Is there a way to dynamically add in User Controls where I would get the name from a session variable: If I have the following code:...
4
by: Ed Jay | last post by:
I generate a DHTML page (a medical report) with dynamically generated text based on user input (answers to questions). The page length changes dynamically. I desire that when the page is printed...
1
by: Petyr David | last post by:
Current: web page has hard coded directories (using checkboxes) user may choose to search for files matching a pattern they enter in text box. Perl is used to search for files and to format HTML...
1
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and...
10
by: Aaron Fude | last post by:
Hi, I have a webpage delivers, let's say, a pdf document. The page is password protected so itially it shows HTML, but when the user logs in the page is reloaded with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.