| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 596 人关注过本帖
标题:ASP做字符处理问题???
只看楼主 加入收藏
daiyuan5210
Rank: 2
等 级:论坛游民
帖 子:7
专家分:12
注 册:2008-2-26
收藏
 问题点数:0 回复次数:1 
ASP做字符处理问题???
<html>
    <head>
        <title>学生信息管理</title>
    <!--#include file="authority.asp"-->
    <!--#include file="conn.asp"-->
    <%
        set rst=server.createobject("adodb.recordset")
        sql="select * from stinfo order by id desc"
        rst.open sql,conn,1,1
        %>
    </head>
    <body topmargin="0">
        
        <!--#include file="top.asp"-->
        <div align="center">
        <table width="732" height="35" cellspacing="0" cellpadding="0">
            <tr>
            <td><a href="info_manager.asp">学生信息列表 </a></td><td><a href="add_info.asp">录入学生信息 </a></td>
                    <td><a href="search_st.asp">查询学生列表</a>                        
                    </td>
                    <td><a href="daima.asp"><h1>代码</h1></a>                        
                    </td>
                <%
                if Not (rst.bof and rst.eof) then'判断数据是否为空
                    NumRecord=rst.recordcount'取出总共有多少条记录
                    rst.pagesize=10'设置每页的显示的记录数
                    NumPage=rst.Pagecount'单上面设置了每页显示的记录数,,下面就可以统计他可以分几页
            
                    if request("page")=empty then'单用户第一次进入页面也是说他要取值,,,,第一次进入的时候还没有传值
                        NoncePage=1 '就显示第一页
                    else
            
        
                        if Cint(request("page")) <1 then '如果当前页面小于1页...取他的值的时候小于1.本来是出错误的..就让他显示第一页
                            NoncePage=1'就显示第一页
                        else
                            NoncePage=request("page")'在取出他传的值..在把他给Noncepage
                        
                    end if    

                        if Cint(request("page")) > Cint(NumPage) Then '如果取的值比总数还要大.就把他搞成..最后的页面.
                            NoncePage=NumPage
                            
                    
                    else               '如果没有记录就都为0
                    
                        NumRecord=0
                        NumPage=0
                        NoncePage=0
                        end if
                    
                    End if
                End If
                    %>
                    <h5><font color="#ffff00">学员信息 </font> </h5>
                    <tr>
                        <td width="71" bgcolor="#ebe9fe" align="center">学号 </td>
                        <td width="71" bgcolor="#ebe9fe" align="center">姓名 </td>
                        <td width="71" bgcolor="#ebe9fe" align="center">性别 </td>
                        <td width="71" bgcolor="#ebe9fe" align="center">班级 </td>
                        <td width="71" bgcolor="#ebe9fe" align="center">出生年月 </td>
                        <td width="71" bgcolor="#ebe9fe" align="center">寝室电话</td>
                        <td width="71" bgcolor="#ebe9fe" align="center">修改 </td>
                        <td width="71" bgcolor="#ebe9fe" align="center">删除 </td>
                    </tr>
                    <%
                    if Not (rst.bof and rst.eof) then
                        rst.move (Cint(NoncePage)-1)*10,1
                        for i=1 to rst.pagesize
                        %>
                        <tr>
                            <td width="71" align="center"><%=rst("user_number")%></td>
                            <td width="71" align="center">
                            <a href=viewuser.asp?id=<%=rst("id")%>><%=Trim(rst("user_name"))%></a></td>
                                    
                        <td width="71" align="center"><a href="mod_info.asp">修改 </a></td>
                            <td width="71" align="center"><a href="delete_info.asp">删除 </a></td>
                        </tr>
                        <% rst.movenext
                        if rst.eof then exit for
                            next
                        else
                            response.write"<h3>没有任何记录</h3>"
                        end if
                        rst.close
                        set rst=nothing
                        %>
                    </table>
                    <table width="742" border="0" align="center">
                        <tr><td height="17"><div align="right">
                            <input type="hidden" name="page" value="<%=Noncepage%>">
                            <% if NoncePage>1 then
                                response.write"|<a href=info_manager.asp?page=1>首页</a>| |<a href=info_manager.asp?page=" &Noncepage-1& ">上一页</a>|&nbsp"
                            else
                                response.write"|首页| |上一页| "
                            end if
                            if Cint(trim(NoncePage)) <cint(trim(NumPage)) then
                                response.write"|<a href=info_manager.asp?page="&NoncePage+1&">下一页</a>| |<a href=info_manager.asp?page=" & NumPage & ">尾页</a>|"
                            else
                                response.write "|下一页| |尾页| "
                            end if
                            %>
                            页次:<font color="#0033cc"><%=NoncePage%></font>/<font color="#0033cc"><%=NumPage%></font>
                            共<font color="#0033cc"><%=NumRecord%></font>条记录
                        </div>
                    </td>
                </tr>
            
        </table>
            
                                    </body>
</html>
    

我现在想把整个ASP代码做一字符处理.......

就向我现在贴的代码一样....显示在我的页面上...
不要显示出...这个网站代码的效果..比如表格,图片,数据,,都不要显示,,,
就把代码显示在页面上,.,,,
搜索更多相关主题的帖子: ASP 字符 
2008-02-26 11:28
zacom
Rank: 2
等 级:论坛游民
威 望:2
帖 子:381
专家分:15
注 册:2007-9-15
收藏
得分:0 
看看JS里面的,好象可以直接显示输入的字符

没有最好只有更好
2008-02-26 21:34
快速回复:ASP做字符处理问题???
数据加载中...
 
   



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

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