making a link clickable...

Discussion in 'C#' started by marshmellow_man, Aug 7, 2008.

  1. #1
    Here's a complicated problem. I work for an educational institution, and after a user enters their credentials there may or may not be a link to display. Look below for what currently displays:

    P01111111 Welcome, <name>
    ADMISSION REQUIREMENTS
    Requirement Received Date Comments Required Application Fee - $30 College Transcript 2/6/2007 College Name Y Ref. Letter Dean of Students
    11/29/2006 Y FINANCIAL AID REQUIREMENTS
    Requirement Status Link for Further Information District Financial Aid Application Received and Satisfied Free Application for Federal Student Aid (FAFSA) results Missing Document [ fafsa url ]
    You see the URL for fafsa? I want that to be a clickable link. The following code involves HTML, ASP, and SQL. There is a loop involved. Basically, you'll see that I copied and pasted what is currently there and got rid of fields which I don't think pertain to the URL. This might take someone who is generous or has a lot of time on their hands. Help is appreciated.

    FINANCIAL AID REQUIREMENTS


    <table cellpadding="10" id="SQLContainer">
    <tr> <th>Requirement</th> <th>Status</th> <th>Link for Further Information</th>
    </tr>
    <% '-----------Bottom (FINANCIAL AID REQUIREMENTS) set conn=Server.CreateObject("ADODB.Connection") conn.Open "HappyServer3;User Id=SpecialUser; Password=Password1186;Data Source=HappyServer3;" set rs = Server.CreateObject("ADODB.recordset") rs.Open "SELECT DISTINCT bbqreq_long_desc, bbq_desc, bbq_url FROM happy.bbqreq, happy.bbqreq, mars.jupiter, happy.bbqtrst WHERE bbqreq_treq_code = bbqreq_code AND bbqreq_aidy_code = '0111' AND bbqtrst_code = bbqreq_trst_code AND bbqreq_pidl = jupiter_pidl AND jupiter_id = '" & request.form("PNumber") & "' AND jupiter_change_ind is null;", conn do until rs.EOF%>
    <tr>
    <%for each x in rs.Fields%>
    <td>
    <%Response.Write(x.value)%>
    </td>
    <%next rs.MoveNext%>
    </tr>
    <%loop rs.close conn.close %>
    <% '-----------Bottom (FINANCIAL AID REQUIREMENTS) set conn=Server.CreateObject("ADODB.Connection") conn.Open "HappyServer3;User Id=SpecialUser; Password=Password1186;Data Source=HappyServer3;" set rs = Server.CreateObject("ADODB.recordset") rs.Open "SELECT DISTINCT bbqreq_long_desc, bbqtrst_desc, bbqreq_url FROM happy.bbqreq;", conn do until rs.EOF%>
    <tr>
    <%for each x in rs.Fields%>
    <td><% a href="Response.Write(x.value)"%></td>
    <%next rs.MoveNext%> </tr>
    <%loop rs.close conn.close %>
    </table>
     
    marshmellow_man, Aug 7, 2008 IP
  2. josver

    josver Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Something like :

    <td><A href="<%=rs("bbqreq_url")%>"><%=rs("bbqreq_long_desc")%>&nbsp;<%=rs("bbqtrst_desc")%></a></td>

    instead of the loop for each x in rs.fields...
     
    josver, Aug 8, 2008 IP