Hi,
Hi,
>
> I have a problem in the display of the ASP screen actually i am
> retrieving and displaying the data from a database when the view
button
> is hit.The contents for display is so long so i want to have a
previous,
> next link on that page so that some 100 records are displayed in each
> page.Pls help me.
> I am attaching my code here please help me where can i make the change
> to split the display of my page.
>
> This is for entering the couriers that is received in an company. Here
> fd=from date
fm=from month
td=to date
tm=to month
fy=from year
ty=to year
rpt=report
and this program displays the details of the courier
> received on the basis of the input
fdate-from date and
tdate-todate will be displayed.
> Please help me
>
> <%@ LANGUAGE="VBSCRIPT" %>
> <SCRIPT language="javascript">
> function CClr(oCmp, Num)
> {
> if(Num == 1)
> oCmp.style.backgroundColor = "#FFFFBF"
> else
> oCmp.style.backgroundColor = "#FFFFFF"
> }
>
> </SCRIPT>
> <html>
> <title>courier</title>
> <body>
>
> <%
> dim fd,fm,fy
> dim td,tm,ty
> dim rpt,stxt
> dim fdate, tdate
> dim branch
> dim toatalrec
>
>
> fd=Request.QueryString("fd")
> fm=Request.QueryString("fm")
> fy=Request.QueryString("fy")
> branch=Request.QueryString("branch")
> fdate=fm+"/"+fd+"/"+fy
>
> td=Request.QueryString("td")
> tm=Request.QueryString("tm")
> ty=Request.QueryString("ty")
> tdate=tm+"/"+td+"/"+ty
>
> stxt =Request.QueryString("stxt")
> number=Request.QueryString("number")
>
> rpt="N"
> dim cn, rs
> set cn = Server.Createobject("ADODB.Connection")
> set rs = Server.Createobject("ADODB.Recordset")
>
> //cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security
> Info=False;Initial Catalog=mmpl;Data Source=mailserver", "it","it"
>
> cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
> Security Info=False;Initial Catalog=mmpl;Data Source=aarServer",
> "it","it"
>
> if stxt=VbnullString then
> if branch="ALL" then
> rs.Open "select * from mmpl_in_trans where rpt_date>='" & fdate & "'
> and rpt_date<='" & tdate &"'", cn
>
> else
>
> rs.Open "select * from mmpl_in_trans where rpt_date>='" & fdate & "'
> and rpt_date<='" & tdate &"' and in_fn='" & branch &"'", cn
>
> end if
>
> response.write("<font Face='Arial Unicode MS'><B>INWARD ENTRY <a
> href='eml_in.asp'>back</a> <a href='..\mmplinout.asp'>Home
> page</a></br>")
> Response.Write ("<Font Face='Arial Unicode MS'><B>From : " & fdate & "
> to : " & tdate &" </br>")
>
> rpt="Y"
>
> else
>
> rs.Open "select * from mmpl_in_trans where in_details like '%" & stxt
&
> "%' order by in_fn", cn
>
> response.write("<font Face='Arial Unicode MS'><B>INWARD entry</b> <a
> href='eml_in.asp'>back</a> <a href='..\mmplinout.asp'>Home
> page</a></br>")
>
> Response.Write ("<Font Face='Arial Unicode MS'><B>Searched for : " &
> stxt &"</br>")
>
> rpt="Y"
>
> end if
>
> if rpt="Y" then
> response.write("<table border=0 > ")
>
> response.write("<tr colspan=0 onblur='CClr(this, 2)'
> onfocus='CClr(this, 1)'><th bgcolor=orange><Font Face='Arial Unicode
MS'
> size=2>DOCDT </Font></th>")
>
> response.write("<th height=5 bgcolor=orange><Font Face='Arial Unicode
> MS' size=2> BRANCH </Font></th>")
>
> response.write("<th bgcolor=orange><Font Face='Arial Unicode MS'
> size=2>DEPT </Font></th>")
>
> response.write("<th bgcolor=orange><Font Face='Arial Unicode MS'
> size=2>DETAILS </Font></th>")
>
> response.write("<th bgcolor=orange><Font Face='Arial Unicode MS'
> size=2>COU NO </Font></th>")
>
> response.write("<th bgcolor=orange><Font Face='Arial Unicode MS'
> size=2>COU DATE </Font></th>")
>
> response.write("<th bgcolor=orange nowrap ><Font Face='Arial Unicode
> MS' size=2> REC TIME </Font></th>")
>
> response.write("</tr><tr>")
>
> if Rs.EOF=False then
> Rs.MoveFirst()
>
> With Rs
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >" & .Fields("IN_DATE") &"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"+.Fields("IN_FN")+"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"+.Fields("IN_DP")+"</Font></td>")
>
> response.write("<td bgcolor='#A4D867'><Font face='Arial Unicode MS'
> size=2 >"+.Fields("IN_DETAILS")+"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"+.Fields("IN_CRNO")+"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"&.Fields("IN_CRDATE")&"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"+.Fields("ENT_TIME")+"</Font></td>")
>
> response.write("<tr>")
> Rs.MoveNext()
>
> End with
> next
> End if
>
>
> End if
>
> %>
> </table>
> <input type="Submit" name="submitted" value="Next">
> </Font></pre></font><form>
> </BODY>
> </HEAD>
> </HTML>
>
> Thanks,
>
> Aarthy
>
*** Sent via Developersdex http://www.developersdex.com ***