CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 3/17/2007 12:56:15 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 60 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
WimVM
Asp.Net User
Hide panel in my masterpage code from the contentpage.3/17/2007 12:56:15 PM

0/0

Hello,

I want to hide a panel in the codebehind of my content page, but the panel itself is located in my masterpage.

This is how I tried to do it, but it doesn't work:

In the masterpage:

<asp:panel runat="server" id="MyPanel">content to hide</asp:panel>

In the content page:

<%

@ MasterType virtualpath="~/mymasterpage.master" %>

Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
   Dim MyPanel As Panel
   MyPanel = Page.Master.FindControl(
"MyPanel")
   MyPanel.Visible =
True
End Sub

How can I hide the panel?

 


Best Regards!
WimVM
Asp.Net User
Re: Hide panel in my masterpage code from the contentpage.3/17/2007 10:33:09 PM

0/0

After hours of reading and testing I solved my own problem. Wanted to share it with you in case you have the same issue: 

Dim myPanel As Panel
myPanel =
CType(Me.Master.FindControl("MyPanel"), Panel)
myPanel.Visible =
False


Best Regards!
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 MVP Hacks and Tips Authors: David Yack, Joe Mayo, Scott Hanselman, Fredrik Normén, Dan Wahlin, J. Ambrose Little, Jonathan Goodyear, Pages: 400, Published: 2006

Web:
Hide panel in my masterpage code from the contentpage. - ASP.NET ... Hide panel in my masterpage code from the contentpage. Last post 03-17-2007 6:33 PM by WimVM. 1 replies. Sort Posts: ...
Hide panel in my masterpage code from the contentpage. - ASP.NET ... Hide panel in my masterpage code from the contentpage. Last post 03-17-2007 6:33 PM by WimVM. 1 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
change master page labels from content page - telerik Forum Back in the code behind of my content page in the "Add to Cart" ... So, you'll need to place another update panel on the master page in the ...
I need help with Master page - I am working on Header and Side lay ... doesn't display the links now Here is my Login.aspx content page html code <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" ...
Tip and Tricks: ASP.NET 2.0 AJAX 1.0 Extensions and Master Pages ... On my MasterPage I've ScriptManager and only one ContentPlaceHolder, on my Web Page there ... Title: Using the update panel to load an entire content page ...
problems with referencing control from master page on content page end master page --- * Content Page: * aspx file: ... (Perhaps I'm just hung up in the circle of my on ... Hide Menu Items Based On Roles ...
RadioButtonList trigger not working in content page - Xtreme .NET Talk I'm using ajax in my content page which contain several control in page. ... So is it the masterpage problem? Part of the code: ...
Re: How to switch content page? "parent" update panel that holds everything except the Script Manager. And then I dropped a variation of your code into my button onClick, ...
TheMSsForum.com >> Asp >> asp.net master page question - The ... So my question is, How can I show and hide a panel which contains a ..... How can I append from my content page to an attribute in my master page? so that ...
.NET ASP.NET Re: How to switch content page? When a content page is requested, it loads its MasterPage(s) and merges ... I added a then I dropped a variation of your code into my button ...




Search This Site:










international characters not displaying correctly in email confirmation messages

dynamically create a popupcalendar instance

skinning: am i missing something?

error in urlrewritemodule

configuration error

custom module - edit component - menu - mybase.actions.add

real newbie: i just can't install dnn!!!

paging result set

how to change text to image in menu?

why httpexception (0x80004005): request timed out. dnn 3.0.8

announcement: downloading releases

login problems...

open source cart for dnn 2 wanted, image gallery available (see details)

shadow module for dnn3

how do i uninstall a module?

schedule

what is the best portal solution for me?

need a file download module that does the following...

css skinning tutorial

bugs / feature ?

anyone used ibm workplace web content management system?

best skin designer

help desk module in xxl

permission system (view, edit, deny?)

cant load images

multiple instances of dnn on one server

control the strength of the password for user registration. (dnn 2.1.2)

dnn modules vs. web parts

dnn installed one time and using different databases?

two dnn sites that i developed

  Privacy | Contact Us
All Times Are GMT