My ASPX page retrieves names from a database into a checkboxlist. This can be a relative long list.
The user clicks on the associated checkbox to select some of the names, after which a button at the bottom of the page is clicked to calculate the number of selected items. The total is then displayed following that button.
What I want to do is return to that the same page location after the number has been calculated, but it returns to the top of the page.
Any suggestions?
Here's the code:
<br><br>
<a name="ChkTot"></a>
<asp:Button id="cmdChkTot" onclick="cmdChkTot_Click" runat="server" Width="100" Text="Check Total"></asp:Button>
<br><br>
..................
dim mstrAttendTot as string = "0"
..................
Sub cmdChkTot_Click(sender as Object, e as EventArgs)
dim PCount as integer
dim itm
for each itm in chkNames.Items
if itm.Selected then
PCount = PCount + 1
end if
next
mstrAttendTot = PCount
end sub