标题:asp网页问题 请问大神怎么同一个栏目名链接到一个页面
只看楼主
andmyd
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2015-7-1
结帖率:0
已结贴  问题点数:20 回复次数:7 
asp网页问题 请问大神怎么同一个栏目名链接到一个页面




这两个二级栏目下  各有一个相同的栏目  动物检疫   我想问下   第二张图的动物检疫 怎么做个链接  点击后直接进入到第一张图的动物检疫那个页面

网站的ASP的  SQL数据库   这俩栏目页面都是动态的  提取数据库的表   麻烦大神支招   我是小白


两个页面的地址是:

http://10.213.116.248/list.asp?id=276&PageID=57

http://10.213.116.248/list.asp?id=275&PageID=36

下面是左边栏目的代码 Type.asp
<%
    PageID=myCdbl(Request.QueryString("Pageid"))
    Sql="select * from Ok3w_Class where ID=" &PageID
    Rs.Open Sql,Conn,0,1
    SortName = Rs("SortName")
    Rs.Close
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="194" height="24" align="left" valign="middle" background="image/zuo1.jpg">
            <span class="STYLE3">&nbsp;&nbsp;&nbsp;<%=SortName%></span>
        </td>
    </tr>
    <tr>
        <td valign="top" align="center">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr height="7"><td></td></tr>
                <%
                    Sql="select ID,SortName from Ok3w_Class where ParentID=" & PageID & " order by OrderID desc"
                    Rs.Open Sql,Conn,0,1
                    If Not(Rs.Eof And Rs.Bof) Then
                %>
                <%Do While Not Rs.Eof%>
                <tr height="16" bgcolor="#E6E6E8" class="STYLE1" onmouseout="this.style.background='#E6E6E8'" onMouseOver="this.style.background='#C2E5F9'; ">
                    <td width="170">
                        &nbsp;&nbsp;&nbsp;<a href="list.asp?id=<%=Rs("ID")%>&PageID=<%=PageID%>"><%=Rs("SortName")%></a>
                    </td>
                    <td width="24" align="left">>></td>
                </tr>
                <tr height="3"><td></td></tr>
                <%
                    Rs.MoveNext
                    Loop
                    else
                    %>
                        <tr height="16" bgcolor="#C2E5F9" class="STYLE1">
                    <td width="170">
                        &nbsp;&nbsp;&nbsp;<%=SortName%>
                    </td>
                    <td width="24" align="left">>></td>
                </tr>
                <tr height="3"><td></td></tr>
                    <%
                    End If
                    Rs.Close
                %>
            </table>
        </td>
    </tr>
</table>
搜索更多相关主题的帖子: SQL数据库 网页 动态 动物 网站 
2015-07-01 16:23
andmyd
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2015-7-1
得分:0 
是不是有这样类似的代码   求大神帮忙
<%
                                                 if DivRs("SortName")="工作职责" then
                                             %>
                                             <a href="Conutent.asp?ArticleID=<%=Cint(DivRs("ID"))%>&ClassID=<%=Cint(Rs("id"))%>&PageID=<%=Cint(Rs("id"))%>&ID=<%=Cint(DivRs("ID"))%>" title="<%=DivRs("SortName")%>">
                                             <%
                                                 else if DivRs("SortName")="动物卫生监督" then
                                                  Response.Write("<a href='list.asp?id=45&PageID=15'>")
                                                 else%>
                                                 <a href="List.asp?ArticleID=<%=Cint(DivRs("ID"))%>&ClassID=<%=Cint(Rs("id"))%>&PageID=<%=Cint(Rs("id"))%>&ID=<%=Cint(DivRs("ID"))%>" title="<%=DivRs("SortName")%>">
                                                <%end if%>
                                             <%end if%>
                                             <%=left(DivRs("SortName"),6)%>
                                             </a></TD>
                                           </TR>
                                             <%
                                                DivRs.MoveNext
                                                Loop
                                                end if
                                                DivRs.Close
                                            %>
2015-07-01 17:05
andmyd
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2015-7-1
得分:0 
麻烦哪位大神帮帮小弟
2015-07-02 10:37
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:396
帖 子:11713
专家分:43267
注 册:2006-5-13
得分:20 
建立同样的链接不就可以么?

活到老,学到老! http://www. E-mail:hu-jj@
2015-07-03 06:14
andmyd
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2015-7-1
得分:0 
回复 4楼 hu9jj
麻烦版主大大  帮给改下  行吗
2015-07-03 09:15
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:396
帖 子:11713
专家分:43267
注 册:2006-5-13
得分:0 
以下是引用andmyd在2015-7-3 09:15:35的发言:

麻烦版主大大  帮给改下  行吗

你将链接的代码复制过去就行了。

活到老,学到老! http://www. E-mail:hu-jj@
2015-07-04 06:40



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-454943-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.480704 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved