I have a master page which contains a menu.
I want the menu's links to open in the details page instead of open in another page.
How to tell the menu link to open in the details page.
I have a master page which contains a menu.
I want the menu's links to open in the details page instead of open in another page.
How to tell the menu link to open in the details page.
you mean within the content place holder?
All you do is redirect your page to that page it is requesting. Your master page will show the same data. If you are trying to keep postbacks down, then you need to specify on those links a function to be called, in javascript. Then in javascript, set the div's content to a new location. Each content place holder creates it's own div (I believe..). Just add the <%= ControlName.ClientID %> to the portion of function being called. This will not work for those with javascript disabled.
First, thnx 4 ur reply.
When I redirect the page it doesn't open in the content place holder.
Plz, if you can, wirte the code to do so.
Thnx in advance.
When you have a placeholder, you name is something.. lets say content1.
The page you wish that content1 to hold, let's say contentpage1, needs to have content1 in there.
so in contentpage1, you need a content tag.
Master page: ContentPlaceHolder
Content page: Content
If you do not have content in there, it will not show. If you have option strict on, you will receive an error.
If you wish for it to be dynamic without page postbacks, it is done through javascript. Create a function, call it with the onclick, and return false on your <A> links. Within this function, grab the ID of the content place holder. With that id, set the inner HTML to be the path to the file. Please, post the code of your content page and let me know the name of your content place holder on your master page.
Thnx again.
But, the idea that I have the master page with a menu.
This menu contains some links for external websites such as :http://www.msn.com.
So when clicking on this menu item it opens in new window not in the details page.
do u understand me?
Thnx again.
Not really. Explain it in 101 for me.
Some links will open in a content place holder, the others will open in a new window. What exactly are you after.. no postbacks? I have no clue exactly what you're after.
Master pages are not made to display external pages.
If you want to have a menu and display external sites, put a iframe where your content panel would be. and on the menu links put target="iframesID"
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.