Welcome Guest Search | Active Topics | Sign In | Register

Menu with master pages Options
Paulo Mondragon
Posted: Tuesday, November 25, 2008 11:17:16 AM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2008
Posts: 38
Hello,

I migrate my application from VS 2003 to 2005. Now I'm using master pages and loading the menu control in this one. When I make click on any menu the link opens a new window, I want to open the link in the same window, in 2003 I only set the TargetPoperty window to solve this, but in 2005 I'm using a ContentPlaceHolder control to open all my forms.

How can make my menu open my link in the same window ?

Thanks a lot.
eo_support
Posted: Tuesday, November 25, 2008 11:35:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

There is no difference from the menu point of view. ContentPlaceHolder is not a window, it's merely a container control that would host your page contents. At runtime, whatever you placed in your ContentPlaceHolder is merged with your master page and it's still a single page.

Thanks
Paulo Mondragon
Posted: Tuesday, November 25, 2008 12:31:47 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2008
Posts: 38
Then, how can I show the links in the same page ?... I have put the target=_self in the HTML code and works correctly with other controls, but with the Menu control opens a new window.
I have put in the TargetWindow property this values: _self and Master (master page) , and it's still opening my links in a new window.

What is the correct value or the correct property I have to set ?

Thanks a lot.
eo_support
Posted: Tuesday, November 25, 2008 12:37:21 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
You don't have to set it anything at all. The default behavior is to open in the same page. You can try this in a separate blank page.
Paulo Mondragon
Posted: Tuesday, November 25, 2008 12:49:19 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2008
Posts: 38
I have remove all setings as you told me. When my initial page opens shows my Menu, I click in any one and opens a new window, in this new window the behavior is correct, I click in any menu and get opened in the same window.

Why I happening this and how can I solve this ?

Thanks.
Saed
Posted: Saturday, November 29, 2008 12:59:40 AM
Rank: Advanced Member
Groups: Member

Joined: 10/15/2008
Posts: 45
Paulo,
I have an identical setup and everything is functioning fine. You need to modify the .aspx pages you call from menu to target the ContentPlaceHolder of your Master through which they should open, i.e. encapsulate their content into <asp:Content> control and set its ContentPlaceHolderID to the name of said ContentPlaceHolder.

Don't specify and Target in menu; nothing what so ever. Your effort should be focused on .aspx pages to load.

Hope this helps,

Regards,

Saed Hamdan
"Man may be destroyed but not defeated" -Hemmingway
Paulo Mondragon
Posted: Thursday, December 11, 2008 4:01:19 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2008
Posts: 38
Saed,

I made some tests and this is the result: When I use a Menu control with any template from the menu builder my links are displayed correctly in the same window.
When I load my menu from a database it's not working correctly, the first click on the menu opens a new window, and the new window works correctly.

Why is this happening and how can I solve this ?

Thanks a lot.
Paulo Mondragon
Posted: Thursday, December 11, 2008 4:08:37 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2008
Posts: 38
I already solve this, I was seting the TargetWindow property in my loading function. Thanks a lot.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.