Mike, In my scenario, I pass the page number & records per page to my stored procedure and return just the exact number of records that I need. This prevents having to return a potentially large amount of records and having to filter thru them.
Mark --- Mike Belcher <[EMAIL PROTECTED]> wrote: > Here is where im going to use paging with the > repeater. > > > > http://www.citimatch.com/Search4.aspx > > > > > Yeah the way I figure it works on my site that is > would be that you do your > search and hit the button to get the search results. > It would then load the > records that qualify via the sql string into that > dataset. Then I would need > to count the total number of records and put that > into a variable such as > TotalRecords. Another variable names StartRecord and > EndRecord. The first > time a page with results are show the StartRecord > would be 1 as the first > record and EndRecord would be 20 to show 20 per > page. Then a link would be > generated with and depending on TotalRecords being > more than 20 records to > even need another page would > Search4.aspx?StartRecord=20&EndRecord=40. Of > course there would be a routine to check total > records to make sure there is > 40 in there to even make the link EndRecord = 40 say > for instance the total > in the dataset is 35 then EndREcord would be 35. If > there were 150 results > and TotalRecords = 150 then of course it would keep > incrementing by 20 until > the end. A big question is how to I count the > records that are loaded into > the dataset and also keeping it open to increment > through it on postbacks? > Once it is loaded I assume I can work with it all I > want. Does this method I > have made up seem workable? Are there any > Improvements that can be made to > it? I am open to all suggestions. > > > HERE IS MY CODE THAT IS RUN WHEN THE USERS INITIATES > THE SEARCH. > > <code> > Private Sub ButtonSubmitSearch_Click(ByVal sender As > System.Object, ByVal e > As System.EventArgs) Handles > ButtonSubmitSearch.Click > > > > 'Setup Variables > > Dim strGender > > Dim strSeeking > > Dim strMin_age > > Dim strMax_age > > Dim strS_state, strS_stateSQL > > Dim strZipcode, strZipcodeSQL > > Dim strS_country, strS_countrySQL > > > > Dim strUsername > > strUsername = Session("Username") > > > > > > Dim strPasswordTest > > strPasswordTest = "scooby1" > > > > 'Build SQL String > > Dim strSQLstring As String > > > > '----------------- GENDER SEEKING GENDER > ------------------------ > > If SearchGender.SelectedValue = "Male > Seeking a Female" Then > > 'Response.Write("SearchGender = Male > Seeking a Female<BR>") > > strGender = "Female" > > strSeeking = "Male" > > > > ElseIf SearchGender.SelectedValue = "Male > Seeking a Male" Then > > 'Response.Write("SearchGender = Male > Seeking a Male<BR>") > > strGender = "Male" > > strSeeking = "Male" > > > > ElseIf SearchGender.SelectedValue = "Male > Seeking a TS/TV/TG > (Transgender)" Then > > 'Response.Write("SearchGender = Male > Seeking a Male<BR>") > > strGender = "TS/TV/TG (Transgender)" > > strSeeking = "Male" > > > > > '=========================================================================== > ================= > > > > ElseIf SearchGender.SelectedValue = "Female > Seeking a Male" Then > > 'Response.Write("SearchGender = Female > Seeking a Male<BR>") > > strGender = "Male" > > strSeeking = "Female" > > > > ElseIf SearchGender.SelectedValue = "Female > Seeking a Female" Then > > 'Response.Write("SearchGender = Female > Seeking a Female<BR>") > > strGender = "Female" > > strSeeking = "Female" > > > > ElseIf SearchGender.SelectedValue = "Female > Seeking a TS/TV/TG > (Transgender)" Then > > 'Response.Write("SearchGender = Male > Seeking a Male<BR>") > > strGender = "TS/TV/TG (Transgender)" > > strSeeking = "Female" > > > > > '=========================================================================== > ================= > > > > ElseIf SearchGender.SelectedValue = > "TS/TV/TG (Transgender) Seeking > a Female" Then > > 'Response.Write("SearchGender = Male > Seeking a Male<BR>") > > strGender = "Female" > > strSeeking = "TS/TV/TG (Transgender)" > > > > ElseIf SearchGender.SelectedValue = > "TS/TV/TG (Transgender) Seeking > a Male" Then > === message truncated === Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
