How to do this with datagrid

L

Lasse Edsvik

Hello

I'm trying to build a page in asp.net that lists employees from a db. And I
was wondering if you could help me translate this asp to asp.net and with a
datagrid. can't figure it out with all if's and so

..... open db and stuff

<table>
<%
while not rs.eof then
%>
<tr>
<%
if trim(rs("info"))<>"" then
%>
<td colspan=2><a
href='read_more.asp?employeeid=<%=rs("employeeid")%>'><%=rs("firstname")%>
<%=rs("lastname")%></td>
<%
else
%>
<td colspan=2><%=rs("firstname")%> <%=rs("lastname")%></td>
<%
end if
%>
<%
if rs("employeepicture")<>"" then
%>
<td valign='top'><img src='../pics/<%=rs("employeepicture")%>'></td>
<td valign='top'><%=replace(rs("sometext"),vbcrlf,"<br>")%></td>
<%
else
%>
<td colspan=2><%=replace(rs("sometext"),vbcrlf,"<br>")%></td>
<%
end if
%>
</tr>
<tr>
<td colspan=2>&nbsp;</td>
</tr>
<%
rs.movenext
wend
%>
</table>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top