D
DC Gringo
I have a two panel controls, one that shows if PageID = 10000 and the other
when PageID = 10001. Problem is that these variables are set in the
usercontrol.ascx.vb rather than the calling webform index.aspx.vb. How can
I declare and set this variable from the webform and have the user control
recognize it?
---Here are my Panels:---
<aspanel id="Panel1" runat="server">
...html1
</aspanel>
<aspanel id="Panel2" runat="server">
...html2
</aspanel>
---Here is my Sub Page_Load in----
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim PageID As Integer
PageID = 10000
If PageID = 10000 Then
Panel1.Visible = True
Panel2.Visible = False
ElseIf PageID = 10001 Then
Panel1.Visible = False
Panel2.Visible = True
End If
End Sub
when PageID = 10001. Problem is that these variables are set in the
usercontrol.ascx.vb rather than the calling webform index.aspx.vb. How can
I declare and set this variable from the webform and have the user control
recognize it?
---Here are my Panels:---
<aspanel id="Panel1" runat="server">
...html1
</aspanel>
<aspanel id="Panel2" runat="server">
...html2
</aspanel>
---Here is my Sub Page_Load in----
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim PageID As Integer
PageID = 10000
If PageID = 10000 Then
Panel1.Visible = True
Panel2.Visible = False
ElseIf PageID = 10001 Then
Panel1.Visible = False
Panel2.Visible = True
End If
End Sub