G
Guest
Hello.
I have a drop down list (DDList) and a Data List (DataList) on a page.
When I choose something from the Drop Down List (it lists States) the
datalist changes to display all the people in that State.
This works great, however, I want a textbox at the top to display how many
people it has returned eg "Found 88 people" or "No one listed here"
Now I have the following code:
<script runat ="Server" language="vbscript">
Sub DataList_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles DataList.DataBinding
If Me.DataList.Items.Count < 1 Then
Me.txtmembercount.Text = "No People To Show"
Else
Me.txtmembercount.Text = Me.DataList1.Items.Count
End If
End Sub
</script>
The problem is that it seems to count for the previous dropdown list value.
Is there a way that I can get it to count the Items after it has refreshed
the DataList and not before?
Many thanks
James
I have a drop down list (DDList) and a Data List (DataList) on a page.
When I choose something from the Drop Down List (it lists States) the
datalist changes to display all the people in that State.
This works great, however, I want a textbox at the top to display how many
people it has returned eg "Found 88 people" or "No one listed here"
Now I have the following code:
<script runat ="Server" language="vbscript">
Sub DataList_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles DataList.DataBinding
If Me.DataList.Items.Count < 1 Then
Me.txtmembercount.Text = "No People To Show"
Else
Me.txtmembercount.Text = Me.DataList1.Items.Count
End If
End Sub
</script>
The problem is that it seems to count for the previous dropdown list value.
Is there a way that I can get it to count the Items after it has refreshed
the DataList and not before?
Many thanks
James