Click here to Skip to main content
15,887,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey Guys,

I have a Server App that communicates with multiple clients.

I need to send the client an html page as a string, and that I can do.
The html page needs to be generated on the fly, and it must contain account info.

I need to be able to change the generated content dynamically without stopping the server.
So I'm thinking about having a XML file that contains the "fields" I need to fetch from a SQL db, and then just then read the xml file in the server and generate the content.

Is my logic correct here, or is there a better way to do it?
How would I go about doing it?
Posted
Updated 2-Dec-10 21:57pm
v2
Comments
Dalek Dave 3-Dec-10 3:57am    
Edited for Grammar and Readability.

If the html is pretty much static with just some data values inserted, I would suggest saving the html file as a file in your application project, placing tags like "[replaceThisWithxxx]" where the data needs to go. Then, instead of creating html on the fly, you can just load the entire file contents into a string and perform a replace on the tags with the appropriate data.
 
Share this answer
 
v3
Comments
[no name] 3-Dec-10 8:02am    
This I can use. i am going to do that but, I'll add the tag I have got in the HTML file to the XML file as well. So that i don't have to stop the server at all
XML
Response.Write("<div><font size='2' face='Tahoma'><B>" +
                                   mydata + "</B></font></div>");





Response.Write("<div style='position:absolute; background-color:#D1FFFF ; width:150px; height:150px;'>"); 
 
Share this answer
 
v2
Comments
[no name] 3-Dec-10 3:34am    
This won't help me as the server is not a asp app.
And you are just giving me formatting?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900