CodeVerge.Net Beta


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

MS SQL 2008 on ASP.NET Hosting
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 1/18/2008 5:31:45 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 43 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
ngek2x
Asp.Net User
Usage of 1 masterpage with a dynamic banner/Flash Banner for multiple aspx1/18/2008 5:31:45 AM

0/0

Hi everyone,

 

I am using Sharepoint 2007 Full version (MOSS and WSS) at work, but i can't find any simple solution for the question standing below:

 

I have the following question:

 

- I want to change the banner in my masterpage for every of the 6 aspx pages.
To get a different banner for every page (for example page news has a banner related to news, page contact has a banner related to contact etc.) you can make 6 different masterpages, but i don't want that.
As soon as there are more projects (websites) with the same demand of different banners for every aspx page within a website you will get hundreds of masterpage files on your server (and it will use extra harddiskspace).

I only want to use 1 masterpage for the 6 aspx pages...

So 1 masterpage with a dynamic banner for all the 6 aspx pages.
for example:

Page1 (Home) -> Banner1

Page2(Company) -> Banner2

Page3(Events) -> Banner3

Page4(Products) -> Banner4

Page5(News) -> Banner5

Page6(Contact) -> Banner6

 

Is the only option to build a custom webpart in Visual Studio and place that in the header of the masterpage or is there a much easier solution(maybe something builtin)?

 

I hope there is an answer to the above question/problem.

Thanks for the time you are taking to read this and for answering this post.

 



 

BigjimFRG
Asp.Net User
Re: Usage of 1 masterpage with a dynamic banner/Flash Banner for multiple aspx1/18/2008 12:36:52 PM

0/0

you can declare several content zones in your master page, you are not limited to 1 content zone and static elements.

that way, you can populate the top content zone (i.e. banner) with a different flash on each of your 6 pages as you do with the main content of your page.

chubbspet
Asp.Net User
Re: Usage of 1 masterpage with a dynamic banner/Flash Banner for multiple aspx1/18/2008 11:40:00 PM

0/0

Hi Nq

Listen I'm just a beginner, but I figured why not give it a shot:) Can't you use a session variable and set it in each page's PageLoad event to the name of the respective page? Then you must just figure out a way how to use that variable name to load your flash banner...

I'm probibly gonna get slaughtered for this reply!!!

Cheers

dpalepu54321
Asp.Net User
Re: Usage of 1 masterpage with a dynamic banner/Flash Banner for multiple aspx1/20/2008 5:05:27 PM

0/0

Hi Nq,

one way is code for all the banners in the master page and hide baneer no. 2 to 6 i.e. make visible=false.

if u know, u can access master page variables from the content page. so when u click company page (may be a hyperlink u used to access it), make baneer 2 visible and remaining banners invisible. And so on.

I think this may fix ur problem.


Mark as answer if this post helps you, So that it will be helpful to others.
----------------------------------------------
Cheers,
dp
Amanda Wang - M
Asp.Net User
Re: Usage of 1 masterpage with a dynamic banner/Flash Banner for multiple aspx1/21/2008 8:29:22 AM

0/0

Hi,

Base on your description, you want to change the banner that is on the master page according to the current page file, right?

You can try to use this code Request.RawUrl(); in the master page codebehind to get the file name of the current page, then change the banner.

Or you can change the banner in every content page:

For example:

Image image= (Image)this.Master.FindControl("ctl00$Image");

Image.ImageURL = "~/image/001.jpg";

Hope it helps.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

...
ASP.NET Tips and Tutorials :: Hot Scripts In this tutorial you will learn about reference Master Page Mebers, ..... and user interfaces that are packed under the banner of Visual Studio.NET 2005. ...
Dreamweaver tutorials, Web design tutorials for Macromedias studio ... If you have used Dreamweaver to create dynamic pages, you are probably familiar with the Repeat .... 1. Use it on an asp or cfm page that has a form on it, ...
Building ASP.NET 2.0 Web Sites Using Web Standards NET control, you should use the ASP.NET Label control instead of the ...... image" />

Web:
CodeProject: Dynamic Themes in ASP.NET 2.0 (C#). Free source code ... How to use Flash to upload multiple files in a medium-trust hosting environment ... and back color of certain div's, back color of homepage banner etc. ...
MiguelMoreno.Net - Experiments A dynamic banner. Imagine creating a banner with many more parameters, ... in conjunction with Flash Communication Server, allows multiple users to see what ...
Brian Wilson! : Branding Office SharePoint Server 2007 The most common branding requirement is developing a page "banner," also known as ... in the Master Page which is also a server side .aspx in the database. ...
SharePoint Branding for the KB Accelerator – Part 1/4 - The Bamboo ... Step 7: Add the Banner. Next we will add the banner to the site template. Add the following code to the Master Page:. 1:




Search This Site:










create a suggestion feature

another menu/sitemap question

back button

menu control and sitemap

dynamic masterpages and themes

nested master pages blues

error: content controls are allowed only in content page that references a master page.

custom attribute to sitemap datasource

master pages and vs.net 2003

master page - content place holder top margin

master page and java script

dynamically create sitemapproviders

themes again :)

menu control appearance

what's the wrong with master page and postback ?

tree view, saving state & using node links as expand and collapse

sitemappath and self joined table

updating a pic on a content?

searching treeview

programaticaly expand a tree

masterpage - contentplaceholder and tables

how to access the content page control events in masterpage' s javascipt

linking menu controls

how can i access a treeview node from other event handlers?

addnode not working when url is empty

sitemapnode problem

printing in master pages

treenode text color

asp.net menu

.net 2.0 menu control problem

  Privacy | Contact Us
All Times Are GMT