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> </td>
</tr>
<%
rs.movenext
wend
%>
</table>
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> </td>
</tr>
<%
rs.movenext
wend
%>
</table>