Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re-write a code

Status
Not open for further replies.

choudhmh

Programmer
Aug 9, 2004
34
GB
Hi Guys,
I have this varaiable where it displays a set of record as stated from a web config file. The web configf file states the maximun record it could display.
I want to show all the result on that page instead of limiting it.

This is how it is declared in the aspx page:
Dim intResultsPerPage As Integer = Cint(ConfigurationSettings.AppSettings("ResultsPerPage")) ' The number of results per page.

On the web config file i limit the result by showing this code:
<add key="ResultsPerPage" value="30"/>
I'm telling the application to show only 30 results.

But now i'm finding problem on how i should re-write the code so there is no limit on the results shown.

Can Anyone help

Thanks
Mac
 
I need to write a code where the page will show all the results in the page, instead of limiting to a number.


ReDim aobjTariff(intResultsPerPage)

' Set the number of results per page.
objGasResults.SetResultsPerPage(intResultsPerPage)
objElecResults.SetResultsPerPage(intResultsPerPage)
objDualResults.SetResultsPerPage(intResultsPerPage)

' Get the numbers of the first and last results in the
' current result page (to be used in the "Results x to y of
' z" string).
intFirstRes = ((intPage-1)*intResultsPerPage) + 1
intLastRes = intFirstRes + intResultsPerPage - 1

' Make sure the last result number is correct.
If intLastRes > intResultCount Then
intLastRes = intResultCount
End If

' Make sure that both the result numbers equal to 0 if there
' are no results.
If intResultCount = 0 Then
intFirstRes = 0
intLastRes = 0
End If

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top