Display Question

  • Thread starter Thread starter Andre
  • Start date Start date
A

Andre

Hi,

I need a little advice with this ;

I retreive some data from a database, and i want to create an output
with a link, logo image, title etc..
But i want to change the data before displaying it..
Ex : if the data is "IN" i want to dipslay "Internet" and make a link to
"internet.aspx" with the appropriate logo.

so i use this method.

while myreader.read()
if myreader.getstring(0) = "IN" then
response.write ("<td>Internet.......
.....
end if
end while

But with this method i can't display the table at the exact place i want
on the page. Can i make a table before and shoot the value in it, or use a
datagrid and shot my modified value in it ?

It's probably easy for a lot of people, but i can't find the way :o))

Thank you.
 
Yes you can.

you can use the FindControl method to find a previously created HTML table
or set a table to run as a server control and it will be ref'd in your code
behind.

Don't use response.write, unless your debugging usually... even then, its
crap.. waste of time... The main reason, because it is rendered before
anything else so it always comes in at the top.

Response.write worked in asp 1.0-3.0 because there was no separation between
presentation and data/biz logic... most times you had your ASP embedded
right into your html... .NET doesn't allow you to do that anymore...
well... sorta.. not recomonded.

=0
 
Back
Top