I have a class that is returning a dataset that I am binding to a repeater fine.
I have a link on the repeater where I can look at the detail on the record.
]
However...
My customer wants a "Next" link on the detail page so that they can look at the detail of whatever the "Next" record is in the Repeater.
Any ideas?
repeater being filled from code below...
Private Sub loadText(ByVal _state As String, ByVal _cat As String) Dim getProfessional As New professionals Using ds As dsProfessionals = getProfessional.SearchProfessional("0", _cat, _state) Session("ds") = ds RepeaterMain.DataSource = ds RepeaterMain.DataBind() End Using End Sub
A Repeater control usually shows (repeats) all records in the dataset by default, so I suspect your dataset is limiting the resultset somehow.
I am unsure what the parameters are in the following line, but the "0" param looks like a zero based index, so perhaps some code on a hyperlink of linkbutton control event that re binds the datasource, incrementing the index, similar to what you are now doing with your sub loadText()
Private Sub loadText(ByVal _state As String, ByVal _cat As String, ByVal intPage as Integer)
Dim getProfessional As New professionals
Using ds As dsProfessionals = getProfessional.SearchProfessional(intPage, _cat, _state)
Session("ds") = ds
RepeaterMain.DataSource = ds
RepeaterMain.DataBind()
End Using
End Sub
Lan ";0)
Larry Brister
ASKER
alanwarren:
I modified the dataset so the the stored procedure is puling the rowcount and I'm incluring that in the dataset and adding it as pary of the hyperlink querystring on the link going to the the detail page. (professionalProfile.aspx)See code below
SO.....
If I save the original dataset as a session variable, it seems to me that there should be some way to
to query the dataset and get the professionalID where rn = rn(querystring)+1
All I need is the professionalID where rn = the hyperlink rn+1
A Repeater control usually shows (repeats) all records in the dataset by default, so I suspect your dataset is limiting the resultset somehow.
I am unsure what the parameters are in the following line, but the "0" param looks like a zero based index, so perhaps some code on a hyperlink of linkbutton control event that re binds the datasource, incrementing the index, similar to what you are now doing with your sub loadText()
Private Sub loadText(ByVal _state As String, ByVal _cat As String, ByVal intPage as Integer)
Dim getProfessional As New professionals
Using ds As dsProfessionals = getProfessional.SearchProf
Session("ds") = ds
RepeaterMain.DataSource = ds
RepeaterMain.DataBind()
End Using
End Sub
Lan ";0)