Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > ASP > ASP Forum > แบ่งหน้า show ข้อมูล ตามที่เรา search asp พอคลิ๊กไปที่หน้า2ไม่มีการโยนค่าที่เรา search ไปให้รบกวนช่วยดู codeให้หน่อยค่ะ



 

แบ่งหน้า show ข้อมูล ตามที่เรา search asp พอคลิ๊กไปที่หน้า2ไม่มีการโยนค่าที่เรา search ไปให้รบกวนช่วยดู codeให้หน่อยค่ะ

 



Topic : 066645

Guest




รบกวนช่วยดู code ให้หน่อยค่ะ ทำการแบ่งหน้าที่เรา search ไปแล้วพอเราคลิ๊กหน้าที่ 2 ทำไมถึงกลับไปที่หน้า เดิมไม่เข้าเงื่อนไขที่เรา search ไว้ค่ะ

Code (ASP)
<html>

<head>
<%
'if request("page") ="" then
	'pageno =10
'else
	'pageno=request("page")
'end if
%>
<%
        PageSi=50  'กำหนดการแสดงผลต่อ 1 หน้า
        if Request.QueryString("PageNo")="" then
            PageNo=1 'ถ้าไม่มีการระบุหน้าเลขหน้า กำหนดให้เป็นหน้า 1
        else
            PageNo=Request.QueryString("PageNo")        'ตัวแปรระบุตำแหน่งหน้ารับค่าที่ส่งมา
        end if
		
		
%>

<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>KCE P/N SAP</title>
<base target="_self">
<style type="text/css">
<!--
.style10 {font-size: 14px; font-family: "Times New Roman", Times, serif;}
.style2 {	font-size: 16px;
	color: #0033FF;
	font-family: "Times New Roman", Times, serif;
}
.style5 {font-family: "Times New Roman", Times, serif; font-size: 14px; color: #0033FF; }
.style6 {color: #0066FF}
.style7 {color: #0033FF}
.style22 {font-family: "Times New Roman", Times, serif}
.style23 {
	font-family: "Baskerville Old Face";
	color: #FF0000;
	font-weight: bold;
}
.style24 {font-family: "Baskerville Old Face"}
-->
</style>
</head>

<body bgcolor="#FFFBFD">

  <form method="GET" action="kce_sap-6.asp">


<% 
VInvPn = Request.QueryString("InvPn")
VSAP = Request.QueryString("SAP")
response.Write(VInvPn)
response.Write(VSAP)
%>
  <div align="center">
    <center>

  <table border="1" width="90%" cellspacing="0" height="50" cellpadding="0" style="border: 1px solid #FF48A4; ; border-collapse:collapse">
  <tr>
  <td width="5%" height="5">
    <p align="center"><b><font color="#0000CC" face="Times New Roman" size="5"><a href="http://kceiweb" target="_parent"><img border="0" src="file:///R|/images/kceilogo.gif" width="30" height="28" align="middle"></a></font></b>

  </td>
  <td width="88%" height="5">
  <p align="center"><span class="style11"><span class="style22"><span class="style13 style19 style23">KCE P/N SAP <font face="Tahoma"><font face="MS Sans Serif" size="1"> </font></font></span></span></span></td>
  <td width="7%" height="5">
    <p align="center"><span class="style11"><span class="style22"><span class="style13 style19 style23"><font face="Tahoma"><font face="MS Sans Serif" size="1">Page :&nbsp;<%=pageno%></font></font></span></span></span>

  </td>
  </tr>
  <tr>
  <td width="5%" height="25">
    <font size="3" face="MS Sans Serif">&nbsp;
    </font>

  </td>
  <td width="88%" height="25" valign="top">
    <p align="center"><font size="3"><span class="style24"><font color="#0066FF">KCEI P/N:</font></span></font><font size="3" face="MS Sans Serif"> <font color="#008000">
     <input type="text" name="InvPn" size="24" value="<%=Request.QueryString("InvPn") %>">
      &nbsp;</font></font><font size="3"><span class="style24"><font color="#0066FF">SAP P/N: </font><font color="#008000">
      </font></span></font><font size="3" face="MS Sans Serif"><font color="#008000">
      <input type="text" name="SAP" size="24" value="<%=Request.QueryString("SAP") %>">
      </font> &nbsp;
      <input type="submit" name="Submit" value="SEARCH">
  &nbsp;</font>  
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="102%" id="AutoNumber1" align="left">
      <tr>
        <td width="150%" height="29">&nbsp;</td>
      </tr>
    </table>
  </td>
  <td width="7%" height="25" valign="bottom">    <p align="center"><font size="3" face="MS Sans Serif">&nbsp;</font>  </td>
  </tr>
  </table>
    </center>
  </div>
  <table border="0" width="100%" height="8" cellspacing="0" cellpadding="0">
    <tr>
      <td width="100%" height="2"></td>
    </tr>
  </table>


<div align="center">
  <center>
    <table width="97%" height="57" border="1" cellpadding="0" cellspacing="0" bordercolor="#0000FF" bgcolor="#FFFFFF" style="border-collapse: collapse">
      <tr bgcolor="#CCFF99">
        <th width="180" height="25" nowrap bordercolor="#0000FF"><span class="style7"> <font style="font-size: 8pt">&nbsp;</font><b><font style="font-size: 8pt"><span class="style10">KCE_PART</span></font></b></span></th>
        <th width="180" height="25" nowrap><span class="style6"> <font style="font-size: 8pt"><font style="font-size: 8pt">&nbsp;</font><b><font style="font-size: 8pt"><span class="style5">SAP_PART</span></font></b></font><b><font style="font-size: 8pt"></font></b></span></th>
        <th width="240" height="25" nowrap><span class="style6"> <font style="font-size: 8pt"><font style="font-size: 8pt">&nbsp;</font><b><font style="font-size: 8pt"><span class="style5">Customer_Part_Number</span></font></b></font></span></th>
        <th width="271" height="25" nowrap><span class="style6"> <font style="font-size: 8pt"><font style="font-size: 8pt">&nbsp;</font><b><font style="font-size: 8pt"><span class="style5">Customer_Part_Description</span></font></b>&nbsp;</font><b><font style="font-size: 8pt"></font></b></span></th>
        <th width="129" height="25" nowrap><span class="style6"> <font style="font-size: 8pt"><font style="font-size: 8pt">&nbsp;</font><b><font style="font-size: 8pt"><span class="style5">CP_REV</span></font></b></font><b><font style="font-size: 8pt"></font></b></span></th>
        <th width="194" height="25" nowrap><span class="style6"> <font style="font-size: 8pt"><font style="font-size: 8pt">&nbsp;</font><b><font style="font-size: 8pt"><span class="style5">Catalog_Number</span></font></b>&nbsp;</font><b><font style="font-size: 8pt"></font></b></span></th>
      </tr>
      <%
	SET CON= SERVER.CREATEOBJECT("ADODB.CONNECTION")
		
		CON.OPEN "Provider=SQLOLEDB.1;Data Source=192.1.1.17;Initial Catalog=PP;User ID=uread;Pwd=read"
		
		
		SET RS = SERVER.CREATEOBJECT("ADODB.RECORDSET")
		
		strsql = "							       select   KCE_PN,SAP_PN,CUSTOMER_PART_NUMBER,CUSTOMER_PART_DESC,CP_REV,CATALOG_NUMBER "
		strsql = strsql & " 						FROM "       
		strsql = strsql & "						KCEI_SAP_PART  Where  KCE_PN like '" & VInvPn &"%' and  SAP_PN  like '"& VSAP&"%' "
		strsql =strsql  & " 						group by KCE_PN"
		'straql =strsql  & "                    
		
		'response.Write(strsql) 
		'response.Write(VInvPn) 
		rs.cursorlocation = 3 
rs.cursortype = 3 
rs.activeconnection = con 

RS.OPEN  strsql ,CON ,1,3

Total = Rs.RecordCount 



'PageCount=Rs.Recordcount
		 
if rs.recordcount>  0  then
	RS.MOVEFIRST
	total=RS.Recordcount 
	pagesize=15
	mtp = total\pagesize
	totalpage = total\pagesize
	if (total mod pagesize) <> "0" then
		totalpage= totalpage+1
		lpage = total mod pagesize
	end if
	RS.Move pagesize*(pageno-1)
	a=1
	endrecord = pagesize
	if  cint(pageno) > cint(mtp) then
		endrecord= lpage
	end if
	end if 

	response.Write(total)
	'response.Write( strsql)
%>

<%if not rs.eof then
 Do while not Rs.Eof and n < PageSi

%>
 
      <tr bordercolor="#0099FF">
        <td height="17" nowrap><div align="left" class="style10"><font size="1" face="Times New Roman"><b><font style="font-size: 10pt"><%=rs("KCE_PN")%></font></b></font></div></td>
        <td height="17" align="right" nowrap><div align="center"><div align="left" class="style10"><font size="1" face="Times New Roman"><b><font color="#000000" style="font-size: 10pt"><%=rs("SAP_PN")%></font></b></font></div></td>
        <td height="17" align="right" nowrap><div align="left"></div>
            <div align="left"><font size="1" face="Times New Roman"><font color="#000000" style="font-size: 10pt"><%=rs("CUSTOMER_PART_NUMBER")%></font></font></div></td>
        <td height="17" align="right" nowrap><div align="left"><font size="1" face="Times New Roman"><font color="#000000" style="font-size: 10pt"><%=rs("CUSTOMER_PART_DESC")%></font></font></div></td>
        <td height="17" align="right" nowrap><div align="center"><font size="1" face="Times New Roman"><font color="#000000" style="font-size: 10pt"><%=rs("CP_REV")%></font></font></div></td>
        <td height="17" align="right" nowrap><div align="center"><font size="1" face="Times New Roman"><font color="#000000" style="font-size: 10pt"><%=rs("CATALOG_NUMBER")%></font></font></div></td>
      </tr>
 <%
rs.movenext

n=n+1
loop

RS.close 

CON.close 


 End if %>


      <tr bgcolor="#FFCCCC">
        <td height="13" colspan="6" nowrap bordercolor="#0000FF"><div align="left"><b><font style="font-size: 16pt"><span class="style2">&nbsp; TOTAL<%=total%></span></font></b></div></td>
      </tr>
    </table>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-family: MS Sans Serif; font-size: 8pt; font-weight: bold">
      <tr>
        <td width="74%" style="font-family: MS Sans Serif; font-size: 8pt; font-weight: bold" height="20" colspan="3"><b><font face="MS Sans Serif" size="1" color="#008000">Page&nbsp;&nbsp; :&nbsp;
           
		<%  For i=1 to totalpage%>
		<%  if i = Cint(Pageno) Then%> 
   
<%=i%>
    
<%Else%> 

		  <a href="kce_sap-6.asp?<%=InvPn %><%=VSAP%>PageNo=<% =i %>"><% =i %></A>
		  <%End IF%> 
    
<%Next%>
		  
</font></b><!--mstheme-->
      </tr>
    </table>
    <p align="left"><b><font face="Tahoma"> </font></b> </p>
  </center>
</div>

</form>

</body>




Tag : ASP







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2011-09-16 14:24:13 By : nnok View : 1654 Reply : 2
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

ลองดูตรง Link URL ครับ ว่ามันส่งค่าไปหรือเปล่า ?xxxx=xxxx&yyyy=yyyy






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-09-16 17:19:31 By : webmaster
 


 

No. 2

Guest


ขอบคุณมากค่ะ MR.WIN
ได้แล้วค่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-09-19 09:19:42 By : nnok
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : แบ่งหน้า show ข้อมูล ตามที่เรา search asp พอคลิ๊กไปที่หน้า2ไม่มีการโยนค่าที่เรา search ไปให้รบกวนช่วยดู codeให้หน่อยค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 02
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่