CodeVerge.Net Beta


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




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 8/8/2006 4:42:13 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 7 Views: 66 Favorited: 0 Favorite
8 Items, 1 Pages 1 |< << Go >> >|
Flax
Asp.Net User
Master page, menu and postback8/8/2006 4:42:13 PM

0

Hi,

newbie in VWB and ASP:NET. I created a webcontrol menu in a master page and I set the visible property to false cause I want it to been showed only if the user click on a link (then the code behind page change that property to true). My problem is that when I click on a item(link) on the menu to go to another page, the master page seems to forget that the prperty value of the menu was set to true now, so in the new page it isn't showen anymore and I have to click on the link again to see it. Is that a way to make the master page remember that property value? Or maybe some better solution? I tried with Page.ispostback with no luck.

Thanks for helping

bmains
Asp.Net User
Re: Master page, menu and postback8/8/2006 7:13:19 PM

0

Hey,

Welcome to the forum.  Redirecting pages loses settings for those properties; remember that the master page is part of the content page at runtime, not in its own area like frames.  You could store that property via session, which you have to capture in code-behind, and check at page load for each page you want to use it in.


Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
Flax
Asp.Net User
Re: Master page, menu and postback8/8/2006 8:56:19 PM

0

Thanks for your answer! Theoretically now I understood why it doesn't work. Practically I have some problems putting what you say in code. Can you give me an example about the syntax to store properties in a session?
bmains
Asp.Net User
Re: Master page, menu and postback8/9/2006 11:54:21 AM

0

Session("Key") = menu1.Visible

Then in your master page file, you check this key on page load:

if (Session("Key") isnot nothing) then
   menu1.Visible = CType(Session("Key"), Boolean)
end if


Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
Flax
Asp.Net User
Re: Master page, menu and postback8/9/2006 1:41:16 PM

0

Thanks a lot! It works perfectly!!!!
Flax
Asp.Net User
Re: Master page, menu and postback9/4/2006 10:11:20 PM

0

Hi again,

I got a new issue. I have an image button in the masterpage which redirect to the home page. One of my content pages has a web form that the user can fill in to send feedback by mail with a button to submit the form and some RequiredFieldValidator for the various text boxes. When I'm in this content page and I click on the imagebutton which redirect to the home page, the redirection doesn't work and instead the RequiredFieldValidator texts appear like if I had clicked on the submit button of the form. Why does this happen? How can i fix it? Hope my explanation of the problem was enough clearly.

Thanks

bmains
Asp.Net User
Re: Master page, menu and postback9/5/2006 12:26:06 PM

0

Hey,

Yes, change the causesvalidation of the imagebutton to false.  Buttons cause any validation in the form to fire by default.  causesvalidation="false" disables that for that button.


Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
Flax
Asp.Net User
Re: Master page, menu and postback9/5/2006 2:48:03 PM

0

Thanks!!! So nice when the solution to a problem is so easy to fix Smile
8 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro C# 2008 and the .NET 3.5 Platform Authors: Andrew Troelsen, Pages: 1370, Published: 2007
Beginning ASP.NET 2.0 with C# Authors: Chris Hart, John Kauffman, David Sussman, Chris Ullman, Pages: 735, Published: 2006
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
Beginning Visual Basic 2005 Authors: Thearon Willis, Bryan Newsome, Pages: 799, Published: 2006
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
ASP.NET 3.5 For Dummies Authors: Ken Cox, Pages: 404, Published: 2008
ASP.NET 2.0: A Developer's Notebook Authors: Wei Meng Lee, Pages: 326, Published: 2005
ASP.NET 2.0 Everyday Apps For Dummies Authors: Doug Lowe, Pages: 504, Published: 2006
Mastering Microsoft Visual Basic 2008 Authors: Evangelos Petroutsos, Mark Ridgeway, Pages: 1118, Published: 2008

Web:
Master page, menu and postback - ASP.NET Forums Master page, menu and postback. Last post 09-05-2006 10:48 AM by Flax. 7 replies . Sort Posts:. Oldest to newest, Newest to oldest ...
Preserve selected menu item on master page with postback - telerik ... NET Preserve selected menu item on master page with postback ... to use the Menu on a Masterpage, and keep the context of the Menu items. ...
Postback & Master Page Talk about Postback & Master Page. ... Reload this Page Postback & Master Page ... several button in order to develop each sub menu. ...
HELP..! ASP.NET 2.0 MasterPage and menu Question.. - .NET ASP Now the issue is that when they postback the MasterPage is rendered last and the MenuItemClick event on the menu control doesn't fire until ...
Postback and dynamically loadiing user controls. What am I doing ... The master page contains a menu control What I ... Well, not for me. I finally got the gridview paging and postback issue resolved thanks to ...
Feedback: TreeView menu in Master Pages - must save it's state ... NET2.0 app I have a Master Page with a TreeView menu on it. ... b) On Page_Init of the master page, if not a postback (Page.IsPostBack == false), rehydrate ...
Postback problem - technical discussion - developerFusion - the ... Incidentally, if you put a button on the master page, does it post back ok? ... MasterPage Menu NOT replacing : master, menu, page I have a Master page with a placeholder menu built into it called... ... NET somehow will restore the old one, and it will do this every postback. ...
TheMSsForum.com >> Asp >> menu postback not working - The ... Master Yoda, Jedi Master Tag: menu postback not working Tag: 382218 ... master pages and image URL Hi, When an image is put on a master page... the url to ...
Master Page Links Problem - ASP.NET If you wish for it to be dynamic without page postbacks, it is done through ... But, the idea that I have the master page with a menu. ...












asp:menuitem problem

navigation using personalization

dynamic menu - determine current page

imagebutton and webpage expired?

multiple sitemaps in one masterpage

problems with internet explorer 7

insert javascript in asp menu

still using asp.net 1.1 need help!!

can you help me?

asp:menu - how can i hide a node yet still allow it to show in a breadcrumb trail?

tree view works through vwd but not via local host or from a remote browser.

find control from inherited master page

multiple sitemapproviders and multiple nodes

sitemap navigation and security

nested masterpages w/ updatepanel animations

dropdown menu like on msdn?

find menuitem without a sitemap

seemless header control + content - how?

can themes change text?

sitemappath control and showstartingnode="false" behavior

images not appearing in treeview

dynamically writing html in the content placeholder

master pages - too much flashing!

dynamically populating the menu control

callback in contentplaceholder

text-align trouble

please, where is the error?

i need to dispose/remove/clear sqlsitemapprovider and recreate it

site map

inheriting master pages to aspx pages. widbey

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT