How to go about writing this classic asp in asp.net

Posted by Phil on Stack Overflow See other posts from Stack Overflow or by Phil
Published on 2010-04-19T10:38:37Z Indexed on 2010/04/19 10:43 UTC
Read the original article Hit count: 170

Filed under:
|
|
|

I am stuck in converting this snipped to asp.net.

set RSLinksCat = conn.Execute("select linkscat.id, linkscat.category from linkscat, contentlinks, links where contentlinks.linksid = links.id and contentlinks.contentid = " & contentid & " and links.linkscatid = linkscat.id order by linkscat.category")


<%if not RSLinksCat.EOF then%><h1>Links</h1>
<br />
<%do while not RSLinksCat.EOF%>
<%set RSLinks = conn.Execute("select * from links where linkscatid = " & RSLinksCat("id") & "")%>

 <strong><%=RSlinkscat("category")%><strong>
    <ul>
                    <%do while not RSlinks.EOF%>
                    <li>
                      <a href = "http://<%=RSLinks("url")%>" target="_blank"><%=RSlinks("description")%></a>
                    </li>
                     <%RSLinks.MoveNext
                    loop%>
    </ul>
                 <%RSLinksCat.MoveNext
                 loop%>
<br />
<%end if%><%conn.close%>

I'm not sure where to start. Can anyone recommend the correct approach i.e sqldatareaders or repeaters or arrays or? VB code samples most welcome.

Thanks

© Stack Overflow or respective owner

Related posts about asp-classic

Related posts about ASP.NET