asp.net master pages, content pages - asp.net

i have a master page with three sections, left pane + 2 right panes (one top header and one main screen area)
i want to have the main screen area dynamically fill a url based on a link click from the top header pane.
so in the header if i have three links - assume i have three pages (one.aspx, two.aspx, three.aspx) and i want to click a one, two, three link in the header pane of the master and have the content load in the main area of each associated child page in the main areas.
any idea?

The point of ASP .NET master pages are to do exactly what you are wanting without needing to fill areas of the page.
What I would suggest doing is moving the content that does not change per page (e.g. left pane and the top header/right pane) into the master page. and create a contentplaceholder for your main screen.
Then create your one.aspx, two.aspx, three.aspx pages and have them use your new master page. Now, when you edit the pages, the only area you will edit will be the content for the main screen area.
Any changes you make on the master page will be immediately reflected on all three pages without having to update each one.
If you had a different goal in mind please let me know. I'll do what I can to help.

When you created your pages you should have selected the MasterPage.
On each page you fill the content areas of your MasterPage.
So if you want to link to your pages you can put the links in each page's Head ContentPlaceHolder. So you link to 'one.aspx', 'two.aspx' and 'three.aspx' directly.
Each page will load it's MasterPage contents when it's requested. So it works like includes not frames (forget frames).

Just create your master page with your layout divs and use the to leave a place holder inside your content tab.
Next create a new page that uses your master page as its base and inside the automatically generated tag put your specific content for that page.
Create a new page inheriting the master page for each content page you want the header links to point to.
Hey presto no need for frames or script.

I'm not sure I completely follow your intent, but if I do get it, it sounds to me like what you want is a floating frame.

Related

Link in iframe causing parent page to jump to top

I have a long html page. At the bottom is an iframe with a long list of links. The links open new pages in the iframe.
When links are clicked inside the iframe, the parent page (as expected) jumps to the top and I have to scroll way back down to get back to the iframe and its newly loaded page.
Here's one hurdle. The iframe contents is hosted on another server outside my control. The admins there have graciously added a call to a js file hosted on our server from the iframe src, but I still can't crack this.
Do I need to calculate the distance of each link from its window top and also the iframe's distance from it's window top and do a bunch of math and then scroll back to that position after the new page loads?
Suggestions?

Extra Page in the end : Adobe Live Cycle Designer

When I select the option for "Go to the Next Page", an extra page is added to the Pdf, Which is not acceptable by the customer.
The first page contains dynamic growing rows, basically the data in the first page will be filled in run time. So, we select the option to flow to the next page , if there is more data.
But, in that case an extra empty page is added , even if the data is not flowing to the next page.
Please find the option that I selected.
Let me know how can I solve this issue.
Please find the image below
Change your pagination "After" setting to "Continue Filling Parent". The pagination settings here refer to Master Pages not normal pages.

Getting secondary sidebar menu to remain highlighted while visiting page

I recently added a page to our website and how it originally is set up so the Top Nav remains hightlighted as well as the menu on the left hand side. I am just looking to get the "Employee training" on the left hand side to remain highlighted while on the page. If you browse the other pages under this section you will see what I mean. Thanks for the help!
http://www.petrowestcorp.com/employee-training/
It appears that you have copied the Company Overview page to the Employee Training page and then made the necessary page changes.
The one change that you missed was within the
Remove the class from the first menu item (Company Overview) and put it in the last menu item (Employee Training)

How should I design my page to allow for dynamic movement of elements on the page?

I'm working on an ASP.NET page where I've got 10 entities. I'll call them Items. An Item can be displayed in one of two modes: Featured or Thumbnail. At any given time there is one Featured Item at the top of the page, and the rest are Thumbnails arranged in a 3x3 grid underneath the featured Item Each item is an ASP usercontrol that contains two divs: one div for Featured and one for Thumbnail -- when the item is Featured, the Thumbnail div is set as invisible and vice versa.
My current goal is to be able to click on any of the Thumbnails and have it physically swap places with the currently featured item to make the clicked Thumbnail become the new current Featured item at the top of the page. The eventual goal is to use jQuery to animate the movement but this is only a side consideration at this point. Also please note that I am trying to do all this without the use of page refreshes (i.e. I wish to use AJAX or javascript)
Here are some of the possibilities that I have been thinking about:
Put the entire page inside an UpdatePanel and rearrange which Item usercontrol goes to which placeholder (i'm using placeholders)
Pros: easy
Cons: VERY INEFFICIENT. Each Item already has a couple UpdatePanels in them despite my trying to minimize my use of them
Use jQuery/javascript to swap the order of the items' occurrences within the page
Pros: simply swapping the order would work because I have the items arranged by floating
Cons: my javascript/jquery is weak, and if a user ever navigates away and comes back the change will not persist.
Dear web dev wizards out there, what would you do if you were in my shoes?
This feels a bit like a slide show. As such, I'd go strictly client side javascript. I wouldn't worry too much about state persistence though you could do that if you want by setting a cookie or appending the url with anchor hashes.
Also, at that point, you wouldn't really need multiple DIVs for each item. You could, via the jQuery move the div itself and then change the SRC attribute (and CSS) of the image to go fetch the larger one.

ASP Menu bar, Static view

I am looking to create a menu bar with a specic type of "action"
Similar to the bar on this website
BBC Sport
Its totally static and has no dynamic or "pop out" sections. When the top menu is clicked the page will re-load and display the lower level in a diffrent colour.
Can this be achived with the Standard ASP:Menu control?
I am not a big fan of the pop out feature however I do not want all my options to be visible to my users at root
Hope that makes sense
Check out this basic ASP.Net Menu control page. You can click on the "Run" buttons to see very basic versions of the menus.
The advantage of using this particular approach is that you can tie it to a sitemap, so you don't have to keep updating the menu code. You just add the page(s) to the sitemap, and the menu picks it up.
You can also dynamically link the menu to different sitemaps, such as one for the admin menu and another for regular users' menu.
The Menu control is in the navigation section of the toolbox.
To experiment with the built-in functionality (before writing your own code to do what it will do for you), just drag and drop a menu control onto your form. Then, use the common tasks menu to:
autoformat -- good for quick & dirty because it sets hoverstyle too
set the data source
set the view type (static or dynamic)
define menu items with an editor
work with templates to set appearance
You have to go to properties to set menu appearance.

Resources