 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

February 18th, 2011, 05:14 AM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Header not showing
Hi Imar
I cannot see the header image on DarkGrey when I run default.aspx?
http://imageshack.us/photo/my-images...creenshot2.jpg
I tried to add it to the darkgrey.css under #header, but it makes no difference.
Regards
friendl
|
|

February 18th, 2011, 05:22 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Can you post the final HTML from the browser for the page you're testing this with? Also, did you copy the complete theme and images from the Resources folder?
Quote:
|
I tried to add it to the darkgrey.css under #header, but it makes no difference.
|
You shouldn't have to as the CSS file in the theme is linked automatically.
Cheers,
Imar
|
|

February 18th, 2011, 05:25 AM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Do you want the view source code from the HTML in the browser?
Here it is:
<!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><title>
Log into Planet Wrox
</title>
<link href="App_Themes/DarkGrey/DarkGrey.css" type="text/css" rel="stylesheet" /></head>
<body>
<form method="post" action="Default.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTY1NDU2MTA1Mg9kFgJmD2QWAgIDD2QWAgIDDxBkZBY BAgFkZGZ5w4RGTpIwCwCF50b7HlzlzMN1eIEAKEdeO3g6QPfG" />
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<div class="aspNetHidden">
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBALU9fPEDQKUw8moBAKKqfinDgKQx9z4B9To3dD4ZS5wInD E4OwNg2H7U5hIPTjmN19F6Pl9Vzr2" />
</div>
<div id="PageWrapper">
<div id="Header"></div>
<div id="MenuWrapper">Menu goes Here</div>
<div id="MainContent">
<div id="MainContent0">
<h1>
Hi there visitor and welcome to Planet Wrox</h1>
<p class="Introduction">
We're glad that you are paying a visit to <a href="http://www.PlanetWrox.com">
www.PlanetWrox.com</a>, the coolest music community site on the Internet.</p>
<p>
Feel free to have a <a href="Default.aspx">look around</a> , there are lots of
interesting <strong>reviews and concert pictures</strong> to be found here.</p>
<p>
You can<a href="Login.aspx"> log in</a> here.</p>
</div>
</div>
<div id="Sidebar">Select a theme:
<select name="ctl00$ThemeList" onchange="javascript:setTimeout('__doPostBack(\'ct l00$ThemeList\',\'\')', 0)" id="ThemeList">
<option value="Monochrome">Monochrome</option>
<option selected="selected" value="DarkGrey">DarkGrey</option>
</select>
</div>
<div id="Footer">Footer Goes Here</div>
</div>
</form>
</body>
</html>
|
|

February 18th, 2011, 05:45 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Your HTML doesn't look right to me.
First, the <a> is missing from the Header div:
Code:
<div id="Header"><a href="~/" runat="server"></a></div>
It's the <a> element that has a background image assigned in the theme's CSS.
The <a> is added on page 200 and altered on page 225. Looks like you removed the <a> there as well instead of just the text Header Goes Here.
Secondly, there's a n additional MainContent0 div that shouldn't be there.
Cheers,
Imar
|
|

February 18th, 2011, 05:56 AM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Maincontent0 is in my div in the default page
Code:
<%@ Page Title="Log into Planet Wrox" Language="C#" MasterPageFile="~/MasterPages/Frontend.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
<div id="MainContent0">
<h1>
Hi there visitor and welcome to Planet Wrox</h1>
<p class="Introduction">
We're glad that you are paying a visit to <a href="http://www.PlanetWrox.com">
www.PlanetWrox.com</a>, the coolest music community site on the Internet.</p>
<p>
Feel free to have a <a href="Default.aspx">look around</a> , there are lots of
interesting <strong>reviews and concert pictures</strong> to be found here.</p>
<p>
You can<a href="Login.aspx"> log in</a> here.</p>
</div>
</asp:Content>
|
|

February 18th, 2011, 05:58 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, but you don't need it ;-) Is the header now showing up?
Imar
|
|

February 18th, 2011, 06:01 AM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes the header is showing.
Thanks for all your help. Great book btw.
|
|

February 18th, 2011, 06:07 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
Thanks for all your help. Great book btw.
|
You're welcome, and thanks!
Imar
|
|
 |
|