I have a user control (.ascx) that will show a list of locations based on the number from user input. For example, if enter 3, the page will list 1ocation 1, location 2, and location 3. My problem is that I cannot get the proper
number to list on the page, in this case the page will show location 3, location 3, and location 3. I put a for-loop in the page_load and in the .ascx file I use Session("locnum") to try to get the location number but it didn't work. Any suggestion will be greatly appreciated.
locations.ascx
--------------
<table>
<tr>
<td>Location # <%=Session("locnum") %></td>
</tr>
</table>
-------------------
Private Sub page_load()
Dim i As Integer
For i = 1 To 3
Session("locnum") = CStr(i)
Dim c1 As New UserControl
c1 = LoadControl("locations.ascx")
phLocations.Controls.Add(c1)
Next
number to list on the page, in this case the page will show location 3, location 3, and location 3. I put a for-loop in the page_load and in the .ascx file I use Session("locnum") to try to get the location number but it didn't work. Any suggestion will be greatly appreciated.
locations.ascx
--------------
<table>
<tr>
<td>Location # <%=Session("locnum") %></td>
</tr>
</table>
-------------------
Private Sub page_load()
Dim i As Integer
For i = 1 To 3
Session("locnum") = CStr(i)
Dim c1 As New UserControl
c1 = LoadControl("locations.ascx")
phLocations.Controls.Add(c1)
Next