Hey all, another question for you.
I just switched over from PHP to ASP.NET. one huge and obvious difference is that with PHP you can use the <? and ?> tags to start writing HTML or PHP wherever you wanted to. Thus, creating a while loop that pulls things out of a database and formats the information at the same time was fairly quick and easy.
With ASP, however, the code is an entirely seperate file from the HTML it generates. So here's the question. Two of them, really. What is the best way to "display" generated HTML? Using Labels?
And, more importantly, if Labels are the answer, is there a better way to generate the HTML than this?
This is just going to generate a jumble of nasty looking HTML when it's all said and done.Code:while(reader.Read()) { main.Text += "<div class=\"article\"><div class=\"title\">"+reader["title"]+"</div>"; }
Any ideas? Thansk!
- Chris