.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Get ContentPlaceholder Beneath Banner

Posted By:      Posted Date: October 10, 2010    Points: 0   Category :ASP.Net

I have the following MaterPage. Unfortuantely, the ContentPlaceHolder overlaps the banner. The last table which is the footer is behaving the way it should (absolutely fixed at the bootom).

What am I doing wrong with this? Or have I done it all incorrectly? Why does the ContentPlaceHolder overlap the banner?

I basically need a banner page that is absolute at the top and 100% width and directly beneath that I need the ContentPlaceHolder at a width of 100%.


<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MyCompanyMaster.master.cs" Inherits="MyCompanyMaster" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <asp:ContentPlaceHolder id="head" runat="server">
    <style type="text/css">

View Complete Post

More Related Resource Links

& in JSP?



I am typically an ASP.NET programmer, and I am familiar with ASP masterpages.

Because, I also know Java, I was handed a JSP project.

I am looking for an equivalent to <asp:Content> whereby I can wrap multiple lines of code/HTML between the open and close tag; for example like so:

<asp:Content ContentPlaceHolderID="content_id" >
<p>Hello, World</p>

However, the closest thing I found is <jsp:param name="param_title" value="param_value" />, but this is an inconvient solution because the param needs to be inclosed within double quotes, whereby multiple lines of code/HTML will need be a series of concatinated strings.

String param_value =
+ "<p>Hello, World</p>"
+ "</div>"

<jsp:param name="param_title" value="<%= param_value %>" />


Send HTML email with banner inside


Hi all,

I want to send html emails with one promo-banner inside. Have a look at my code... I try but with no success.


            Dim strFrom, strTo, strSubject, strBody As String
            Dim myMessage As MailMessage
            Dim mySmtpClient As SmtpClient
            strFrom = "SENDER<test@example.com>"
            strTo = Session("eemaill")
            strSubject = "HELLO THERE!"
            strBody = "HELLO THIS IS MY MSG<br />" + _
            " <script type='text/javascript'> var ai = 899; var rc = 40; var rt= 2; var rc_width = 724; var rc_height = 90; </script>" + _
            " <script type='text/javascript' src='http://assets.example.com/s/ads.js'></script><br /><br />" + _
            "<b>THANK YOU</b>"
            myMessage = New MailMessage(strFrom, strTo, strSubject, strBody)
            myMessage.IsBodyHtml = True
            mySmtpClient = New SmtpClient("mail.example.com")




Thank you

problem with banner s structure

 Hello everyone,   Last night I was watching the banner of the first page of this website I mean this address http://www.asp.net/ and when I save background of that (I mean the blue part)I could not understood how it was made could you please help me to understand how I can do that?

Page has one or more controls that do not correspond with con

I'm posting this in VS 2008 forum since I wasn't getting this error when this was in VS 2005.  It's complaining about my content tags but I have not a clue why, everything looks fine to me.  I've included the master page so what's the deal? <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Sub.master.cs" Inherits="Web.MasterPages.Sub" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <title id="Title" runat="server" /> <link id="main_styles" href="~/main.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { background-image: url(images/back.jpg); } .style1 {color: #B92722} #bigImg { position: absolute; display: none; } </style> </head> <body class="Mainbody"> <form id="form1" runat="server"> <!-- Main Table --> <div class="centered-table"> <table width="100%" border="0" cellspacing="0" cellpadding="0"&g

background image in banner, over-ridden?

Hi folks, I am working on a master page with a stylesheet.css I put together.  Originally, I set the background as a simple color for the banner attribute until I had an image.  Now that I have the image, I have replaced the background color with the new image in the css file.  While in design mode, it works.  The background color has been replaced with the image.  However, when I run the application, it defaults back to the color (green for simplicity).  I am not sure why this is happening.  Somehow the original background is being pulled from somewhere, and I do not know where.  Has someone had this happen as well?  Why would the background image be displayed in Visual Studio, and then revert back to a previous setting when you run the application?Here is the master page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> <title></title> <link href="StyleSheet.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form2&q

How do I have a banner that doesn't scroll?

Can someone please point me to an example of how to, in MVC 2, do a master page so that the banner/menu area of the page does not scroll with the rest of the page? In the past with ASP Classic, I would just use Frames... Richard  

determining if there is content in a ContentPlaceHolder when using Html.RenderPartial

What I'm trying to do is use one master page with two different layouts.  Currently we have a "master" master page that has all the common elements and two master pages that use it for the two different layouts.  This gives us 3 master pages and there's developer confustion and it is a bit of a hassle to keep them consistent.  What I'd like to do instead is say "if there's anything in the MainContent ContentPlaceHolder, show the single column layout, otherwise show the two column layout".From what I've read you're supposed to be able to do this by using something like the following:<% if (this.MainContent.Controls.Count > 0) //single column layout { %> <div class="center-column-middle clearfix"> <!--.form-holder--> <div class="form-holder"> <asp:ContentPlaceHolder ID="MainContent" runat="server" /> </div> <!--/.form-holder--> </div> <% } %> But this.MainContent.Controls.Count retuns zero when the ContentPlaceHolder uses Html.RenderPartial.  For example, this works fine:<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> blah blah blah </asp:Content> This causes this.MainContent.Controls.Count to return 1.  If I rem

Login Page issue with the Banner



I'm using Visual Web Developer 2010 Express.

I've published the application however when I view the login page the banner is not displayed I just get the red x.. It's fine in pages in other folders but not the Login page which sits in the Account folder however I'm getting the menu so it seems to be picking up the master page.

I've added the image to the Account folder but it just wont show, any ideas?





<%@ Page Title="Log In" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Login.aspx.vb" Inherits="PODPortal.Login" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
        Log In
        <asp:HyperLink ID="RegisterHyperLink" runat="server" Visible="false" Enab

Aero Glass Desktop Banner

First, I'm not a developer.  I was wondering if anyone has created or how difficult would it be to create a Desktop Banner that would reside and across the top of the desktop and  that could be used to display the security level of a desktop (ie., Unclassified) and that is persistent.  I was looking for something transparent like the Aero Glass feature where it would not get in the way of maximized windows.  Can some point me in the right direction or give me some advice?  Thanks


how to edit swf file placed in banner


Hi all.

I want to re design a web site. so that i found a layout but it was a premium ones..

how ever i extracted the swf file.. but cant edit that


I need to edit that navigation..menu bar contents.. how to do that?

also i shud keep my images in image slider there...

suggestions plz

Windows Security Login popup for 3 times after logged in after changed theme banner


Hi experts,

I do have problem with my SharePoint theme. I have actually create new theme by customized a theme from the default theme in SharePoint. I have replace with new banner and do some changes in the coding site.

After i have applied the theme to my portal, i face problem when i try to logged in using a username from Read Only group, it will appear the windows security login for 3 times before the portal can be access, unfortunately the banner are still not visible. Sometimes, its appear, sometime it didn't. 

However, when i logged in user System Account, i have no problem accessing the page without windows security login appear and the banner are there.

What am i missing, please do let me know. Thank you.

SharePoint GlobalTitleArea (Banner) Customization

Well I sure hope someone here can help me answer this question.  I have spent hours trying to 'make' it work for me using SharePoint Designer.  I have also spent hours trying to find online instructions on how to do this.
Here is what I want to do.  I need to replace the white space in at the top of the defaul SP Template with a colored banner.  The thing is that I would like it to be a background just for that section.  The issues that I am running into is that since that top banner section is made with a 3 celled table within a table (nested), it just keeps repeating the image in each cell...which just looks weird.  I want the colored banner to span the entire height and width of the top banner are (in SharePoint Designer it is the GlobalTitleArea.  The Banner will be behind the Logo which I have already replaced with my company's custom logo.
I hope that I haven't confused anyone and that someone can help shed some light on this for me.

big banner cached



I've built a web site with a big banner ... every time I change, post back or update the page the banner keep several second to show...

is there any way to cache it and read the cache to see it istantanealy ?

getting the body onload event in a Contentplaceholder


Dear Friends,

I am displaying a map on a aspx web page using Mapserver and openlayers.
The map was being displayed fine on a normal aspx page.
Then I added a Masterpage to it and with it came 2 ContentPlaceholders.
I put the Div for displaying the map in one of the ContentPlaceholders.

But the problem is that map is no longer displayed.
For displaying the map I need to call a JS function init() in the body onload event.
But there is no body onload event in ContentPlaceholders.
I tried putting like this:

<script type="text/javascript" language="javascript">

body.onload = init();

function init()


But I get error.

How to tackle this problem?

Thanks for your responses.

Display a custom banner which fills the entire top of the banner section


Hi I want to Display a custom banner which fills the entire top of the banner section, but still lets all the other graphics display, and ribbon. Can any one lwt me know how to do...

Thanks in advance

can't use Double UpdatePanel. ContentPlaceHolder, ScriptManager


I have to ContentPlaceHolder One in head tag and the other one in body->form tag. In my master page.


<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Global.master.cs" Inherits="impulsmusic_se.Global" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <asp:ContentPlaceHolder ID="head" runat="server">
    <link href="sty/StyleSheet.css

Flash Banner



I add an ad banner to my page. This ad banner should play .flv flash file. Because I don't know how to add an Ad Rotator that can play .flv file, I simply add an Flash player. My problem is how to let it play repeatedly (non-stop)?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend