Click here to Skip to main content
15,903,030 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: DropDownList remove blanks from string Pin
Nimua12-Jul-07 20:04
Nimua12-Jul-07 20:04 
GeneralRe: DropDownList remove blanks from string Pin
Nimua12-Jul-07 20:05
Nimua12-Jul-07 20:05 
QuestionRe: DropDownList remove blanks from string Pin
Nimua17-Jul-07 21:35
Nimua17-Jul-07 21:35 
AnswerRe: DropDownList remove blanks from string Pin
Nimua18-Jul-07 22:30
Nimua18-Jul-07 22:30 
QuestionASP vs cold fusion Pin
LCI12-Jul-07 4:14
LCI12-Jul-07 4:14 
AnswerRe: ASP vs cold fusion Pin
Not Active12-Jul-07 4:30
mentorNot Active12-Jul-07 4:30 
AnswerRe: ASP vs cold fusion Pin
Paul Conrad12-Jul-07 17:57
professionalPaul Conrad12-Jul-07 17:57 
QuestionShow data at multiple page in asp Pin
Y_Kaushik12-Jul-07 4:11
Y_Kaushik12-Jul-07 4:11 
Hello all
I am new in asp . I have write a pagging code in it connected with sql server database . But problem is that it show the record at multiple pages. suppose name of user one is show at page one , Its again show in page two and some of record of page three also . I can not identified its reason. My code is below.

<%
Option Explicit
Dim conn,rst,sql,Rs,uname,passwd
Dim intTotalpages,intCurrentpage,intI,strQ,j, varSearch,objConec
Const intPagesize=10
intI=1
If Request("currentPage")="" Then intCurrentpage=1 Else intCurrentpage=Request("currentPage")
if request("currentPage")="0" Then intCurrentpage=1

Set conn = Server.CreateObject("ADODB.Connection")

conn.open "PROVIDER=MSDASQL;" & _
"DSN=subscribedsn;DATABASE=subscribe;UID=xyz;PWD=xyz;"

Set conn = Server.CreateObject("ADODB.Connection")

With conn
' Set .ActiveConnection=objConec
.cursorLocation=3
' .cachesize=intPagesize
' Set conn =objConec.Execute (StrQ)
End With
conn.open "PROVIDER=MSDASQL;" & _
"DSN=subscribedsn;DATABASE=subscribe;UID=xyz;PWD=xyz;"

sql = "select * from table "

'response.Write(sql)
'response.End()

Set rst = Server.CreateObject("Adodb.Recordset")
rst.Open sql, conn, 3, 3


If Not rst.Eof Then
rst.pageSize=intPageSize
If Not isNumeric(intCurrentpage) Then intCurrentpage=1
If (CInt(intCurrentpage) > rst.PageCount) Then intCurrentpage=1
rst.absolutePage=intCurrentpage
intTotalpages=rst.pageCount
End If
%>


<title>XYZ






  Back
Logout  
<% If rst.EOF or rst.BOF then %>
<%
Else
do while not rst.EOF %>
<% rst.movenext
loop
rst.movefirst
End If
%>
 List Of Subscribe Members
User Name
E Mail
Project
Country
Dated
Status
Delete
No Registration posted !( Database Empty )
<%=rst("nam")%><%=rst("email")%><%=rst("prj_type")%><%=rst("country")%><%=rst("date_field")%><%=rst("status")%>">
<%if not rst.BOF or not rst.EOF then%>
Page -»
<%
for j=1 to intTotalpages
if j=int(intCurrentPage) then
%>

?currentPage=<%=j%>"><%=j%>
<%else%>
?currentPage=<%=j%>"><%=j%>
<%
end if
next
end if
rst.close : conn.close
set rst=nothing : set objConec=nothing
%>
 






Regard's
Kaushik

AnswerRe: Show data at multiple page in asp Pin
Venkatesh Mookkan12-Jul-07 16:29
Venkatesh Mookkan12-Jul-07 16:29 
GeneralRe: Show data at multiple page in asp Pin
Y_Kaushik12-Jul-07 20:20
Y_Kaushik12-Jul-07 20:20 
QuestionGridView Sorting Problem Pin
vickyshah12-Jul-07 3:45
vickyshah12-Jul-07 3:45 
AnswerRe: GridView Sorting Problem Pin
Sathesh Sakthivel12-Jul-07 3:48
Sathesh Sakthivel12-Jul-07 3:48 
GeneralRe: GridView Sorting Problem Pin
vickyshah12-Jul-07 3:52
vickyshah12-Jul-07 3:52 
GeneralRe: GridView Sorting Problem Pin
Not Active12-Jul-07 4:00
mentorNot Active12-Jul-07 4:00 
GeneralRe: GridView Sorting Problem Pin
Sathesh Sakthivel12-Jul-07 4:00
Sathesh Sakthivel12-Jul-07 4:00 
GeneralRe: GridView Sorting Problem Pin
Christian Graus12-Jul-07 4:00
protectorChristian Graus12-Jul-07 4:00 
GeneralRe: GridView Sorting Problem Pin
Not Active12-Jul-07 4:12
mentorNot Active12-Jul-07 4:12 
AnswerRe: GridView Sorting Problem Pin
Steve Echols12-Jul-07 16:32
Steve Echols12-Jul-07 16:32 
QuestionCheckbox in Datagrid Pin
Kurian_Kurian12-Jul-07 3:22
Kurian_Kurian12-Jul-07 3:22 
AnswerRe: Checkbox in Datagrid Pin
Paul Conrad13-Jul-07 12:18
professionalPaul Conrad13-Jul-07 12:18 
QuestionCheckboxes in gridview Pin
samerh12-Jul-07 2:30
samerh12-Jul-07 2:30 
AnswerRe: Checkboxes in gridview Pin
Christian Graus12-Jul-07 2:45
protectorChristian Graus12-Jul-07 2:45 
GeneralRe: Checkboxes in gridview Pin
samerh12-Jul-07 3:26
samerh12-Jul-07 3:26 
GeneralRe: Checkboxes in gridview Pin
Christian Graus12-Jul-07 4:55
protectorChristian Graus12-Jul-07 4:55 
QuestionGridView Pin
.NET- India 12-Jul-07 2:20
.NET- India 12-Jul-07 2:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.