Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8291505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:09:12+00:00 2026-06-08T13:09:12+00:00

Partial Class Details Inherits System.Web.UI.Page Private Sub Hiding() Dim Panel1 As Panel Dim Panel2

  • 0
Partial Class Details
    Inherits System.Web.UI.Page
    Private Sub Hiding()
        Dim Panel1 As Panel
        Dim Panel2 As Panel
        Dim Panel3 As Panel
        Dim Panel4 As Panel
        Dim Panel5 As Panel
        Dim Panel6 As Panel
        Dim menu1 As Menu

        Panel1 = LoginView1.FindControl("Panel1")
        Panel2 = LoginView1.FindControl("Panel2")
        Panel3 = LoginView1.FindControl("Panel3")
        Panel4 = LoginView1.FindControl("Panel4")
        Panel5 = LoginView1.FindControl("Panel5")
        Panel6 = LoginView1.FindControl("Panel6")
        menu1 = LoginView1.FindControl("Menu1")

        Panel1.Visible = False
        Panel2.Visible = False
        Panel3.Visible = False
        Panel4.Visible = False
        Panel5.Visible = False
        Panel6.Visible = False
    End Sub

    Protected Sub Menu1_MenuItemClick(sender As Object, e As System.Web.UI.WebControls.MenuEventArgs)
        Dim Panel1 As Panel
        Dim Panel2 As Panel
        Dim Panel3 As Panel
        Dim Panel4 As Panel
        Dim Panel5 As Panel
        Dim Panel6 As Panel
        Dim menu1 As Menu


        Panel2 = LoginView1.FindControl("Panel2")
        Panel3 = LoginView1.FindControl("Panel3")
        Panel4 = LoginView1.FindControl("Panel4")
        Panel5 = LoginView1.FindControl("Panel5")
        Panel6 = LoginView1.FindControl("Panel6")
        menu1 = LoginView1.FindControl("Menu1")

        If menu1.ID = "Medical and Nursing MDT" Then
            Panel1 = LoginView1.FindControl("Panel1")
            Panel1.Visible = True
        ElseIf menu1.ID = "STACO" Then
            Call Hiding()
            Panel2.Visible = True
        ElseIf menu1.ID = "Infection alerts" Then
            Call Hiding()
            Panel3.Visible = True
        ElseIf menu1.ID = "Discharge and Health" Then
            Call Hiding()
            Panel4.Visible = True
        ElseIf menu1.ID = "Delays" Then
            Call Hiding()
            Panel5.Visible = True
        ElseIf menu1.ID = "Out of hours communcation" Then
            Panel6.Visible = True
        End If

    End Sub


End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:09:14+00:00Added an answer on June 8, 2026 at 1:09 pm

    try something like this… I know this code is raw but it may help you.

    'declare local variables
    
    Dim p1 As Panel
    'search in the control tree for specific panel - Panel1 is the panel control name
    Dim myControls As Control() = Me.Controls.Find("Panel1", False)
    'direct cast and assign to local variable
    p1 = DirectCast(myControls(0), Panel)
    
    If (myControls.Length > 0) Then
    'code for panel logic
    End If
    

    HTH
    – Nilesh

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my code: public partial class Image : System.Web.UI.Page { protected void Page_Load(object
I have the following code: public partial class queryTerm : System.Web.UI.UserControl { private static
I'm trying to call RoleEnvironment.GetConfigurationSetting(SOMEKEY) like so: public partial class AzureBasePage : System.Web.UI.Page {
I have the following code... public partial class DownloadFile : System.Web.UI.Page { protected void
public partial class Table_Traversing : System.Web.UI.Page { Table table1 = new Table(); TableRow table_row1
The code public partial class Table_Traversing : System.Web.UI.Page { Table table1 = new Table();
Given this class public partial class Default : Page { private IRepository repo; ...
In the following master.cs code: public partial class Default : System.Web.UI.MasterPage { protected void
Consider this source: public partial class FormTest : Form { private Test test {
With this code: public partial class Form1 : Form { private static readonly int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.