Click here to Skip to main content
15,918,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am very new to HTML.

Is it possible to bind data from an C# object to a html file dynamically?

I need to show the data in html file in tabular format.

For Ex. I have a html file with some predefined formatting, like header, color and a table etc. I have a C# data object, which can have different data each time (say at one time 3 rows, another time 5 rows), at runtime I need to bind the data to html file and display.

Regards
Posted
Comments
Hiren solanki 29-Dec-10 6:18am    
Do you know about ASP.Net ?
Sunasara Imdadhusen 29-Dec-10 6:46am    
You should know ASP.Net before performing some server side operation!!
fjdiewornncalwe 29-Dec-10 10:19am    
Please take the time to learn that in order to do this you will require the services of ASP.Net or similar technology. You cannot databind to html directly.
thatraja 29-Dec-10 10:25am    
You can't bind to HTML file. You can in ASP.NET page. Or you can generate HTML page dynamically with table data.

Is this an ASP.NET application, or is it a desktop application that populates a .htm file based on some operation? Your question doesn't make it clear. Perhaps if you clarify your question, and add some real detail to it we can take a shot at answering it.
 
Share this answer
 
try to below way...
:rose:
XML
Response.Write("<div><font size='2' face='Tahoma'><B>" +
                                   mydata + "</B></font></div>");


:rose:
if u want reference then, click below link...
C# Dynamicly Generating HTML[^]
 
Share this answer
 

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