I am writing some pages in ASP.NET VB. Based on some database results I need certain pieces of information to display, basically if a column is not null then write out <p>database value</p>. So far, all the databse connection is called in my .aspx.vb file. Rather than have an asp:label (which creates a <span> not a <p> anyway) I was hoping I could keep all my HTML markup front end, so have some ASP Classic code that looks like:
if results.item("name").value <> "" then
response.write("<p>" + results.item("name").value + "</p>"
The problem with this of course is results is not accessible from the front end.
Possibly this is the wrong approach, maybe someone can suggest an alternative if there are better ways. However, I don't like relying solely on Labels, Panels and other built in elements which create spans, divs, etc respectively.
View Complete Post