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



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/26/2007 2:49:43 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 22 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
chaitanya_k
Asp.Net User
problem with master pages, solution plz12/26/2007 2:49:43 PM

0/0

I have created a master page. When I am adding this master page to .aspx files which are in the root directory, it is working fine. When , I am adding master page to .aspx files which are in sub folders , I am getting some problem. Initially, images are not displayed. If I am using runat="server", they are dispalyed. But , I am not getting some text and background color for some part of the master page.

Please check in the below code. Where  "my company" and "company slogan" texts are there , there is problem and also backcolr at that place is not coming.

U plz check with this code. (Main prob. is with subfolders  only to which I am adding this master page)

 

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

<!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>VISAD 1.001 Vispro Technologies Pvt Ltd</title>

<link href="myfolder/StyleSheet.css" runat="server" rel="stylesheet" type="text/css" />

 

</head>

<body>

<form id="form1" runat="server">

<table width="780" border="0" align="center" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF">

 

<tr>

<td align="left" valign="top" style="height: 188px"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="myfolder/h_bg.gif"  >

<tr>

<td align="left" valign="top" style="width: 12%; height: 162px;"><img src="myfolder/VISPRO.JPG" runat="server" alt="" width="89" style="height: 96px"/></td>

<td width="79%" align="left" valign="top" style="height: 162px"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="30">&nbsp;</td>

</tr>

<tr>

<td><span class="style8"><a>my company</a></span></td>

</tr>

<tr>

<td><span class="style5">company slogan</span></td>

</tr>

</table></td>

<td width="9%" align="left" valign="top" style="height: 162px"><img src="myfolder/h_2.jpg" runat="server" alt="" width="303" height="162"/></td>

</tr>

 

<tr>

<td colspan="3" align="left" valign="top" bgcolor="#FFFFFF" style="height: 7px"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="7"/></td>

</tr>

</table></td>

</tr>

<tr>

<td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><img src="myfolder/box_top.jpg" runat="server" width="761" height="10" alt=""/></td>

</tr>

<tr>

<td background="folder1/box_bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td align="center" valign="top" style="width: 190px"><table width="180" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table width="100%" border="0" cellspacing="4" cellpadding="0">

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="HOME.aspx">Home</a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="Lang2.aspx">Quick Search</a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="#">Regular Search</a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="#"> Maps </a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="#">About Us </a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="#">Contact Us </a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td colspan="2" align="center" valign="middle">&nbsp;</td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle" bgcolor="#CAE7FB"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="1"/></td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="10"/></td>

</tr>

<tr>

<td align="center" valign="middle"><img src="myfolder/bullet1.gif" runat="server" width="15" height="15" alt=""/></td>

<td width="133"><span class="style2">&nbsp;Latest News</span></td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="10"/></td>

</tr>

</table></td>

</tr>

<tr>

<td><span class="style11">Thank you for your interest.We welcome you to our site.<br/>

</span><span class="style4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="orange_link">more &raquo;</a></span></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td background="myfolder/dots.gif"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="2"/></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td><span class="style11">Our's is a growing level organization in the IT SECTOR. We are having four branches in chennai city. We are planning to open new one in Hyderabad also.<br/>

</span><span class="style4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="orange_link"></a></span></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td background="folder1/dots.gif"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="2"/></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

 

<tr>

<td><span class="style11">We are about to release one product which helps the users to gather information regarding various sectors like banking, health etc. <br/>

</span><span class="style4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="orange_link"></a></span></td>

</tr>

</table></td>

</tr>

<tr>

<td align="center" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td colspan="2" align="center" valign="middle">&nbsp;</td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle" bgcolor="#CAE7FB"><img src="folder1/spacer.gif" runat="server" alt="" width="1" height="1"/></td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle"><img src="myfolder/spacer.gif" alt="" width="1" height="10"/></td>

</tr>

<tr>

<td align="center" valign="middle"><img src="myfolder/bullet1.gif" runat="server" width="15" height="15" alt=""/></td>

<td width="133"><span class="style2">&nbsp;Latest News</span></td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="10"/></td>

</tr>

</table></td>

</tr>

<tr>

<td><div align="justify" class="style11">You can select the location through maps and get whatever information you require.</div></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

</table></td>

</tr>

</table></td>

<td align="center" valign="top"><table width="92%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="35" style="width: 537px"><span class="style10">Welcome To Our Company</span></td>

</tr>

<tr>

<td class="style3" style="height: 514px; width: 537px;">

<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

</asp:contentplaceholder>

</td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><img src="myfolder/box_bottom.jpg" runat="server" width="761" height="7" alt=""/></td>

</tr>

</table></td>

</tr>

 

</table>

<div>

&nbsp;</div>

<table>

<tr>

<td align="center" style="height: 30px; width: 760px;"><span class="style11">Copyright &copy; 2006 Company Name Inc. All rights reserved. </span></td>

</tr>

</table>

</form>

 

</body></html>

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

<!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>VISAD 1.001 Vispro Technologies Pvt Ltd</title>

<link href="myfolder/StyleSheet.css" runat="server" rel="stylesheet" type="text/css" />

 

</head>

<body>

<form id="form1" runat="server">

<table width="780" border="0" align="center" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF">

 

<tr>

<td align="left" valign="top" style="height: 188px"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="myfolder/h_bg.gif" runat="server" >

<tr>

<td align="left" valign="top" style="width: 12%; height: 162px;"><img src="myfolder/VISPRO.JPG" runat="server" alt="" width="89" style="height: 96px"/></td>

<td width="79%" align="left" valign="top" style="height: 162px"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="30">&nbsp;</td>

</tr>

<tr>

<td><span class="style8"><a>Vispro Technologies</a></span></td>

</tr>

<tr>

<td><span class="style5">Building global path </span></td>

</tr>

</table></td>

<td width="9%" align="left" valign="top" style="height: 162px"><img src="myfolder/h_2.jpg" runat="server" alt="" width="303" height="162"/></td>

</tr>

 

<tr>

<td colspan="3" align="left" valign="top" bgcolor="#FFFFFF" style="height: 7px"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="7"/></td>

</tr>

</table></td>

</tr>

<tr>

<td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><img src="myfolder/box_top.jpg" runat="server" width="761" height="10" alt=""/></td>

</tr>

<tr>

<td background="folder1/box_bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td align="center" valign="top" style="width: 190px"><table width="180" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table width="100%" border="0" cellspacing="4" cellpadding="0">

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="HOME.aspx">Home</a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="Lang2.aspx">Quick Search</a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="#">Regular Search</a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="#"> Maps </a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="#">About Us </a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#2E5474" bgcolor="#2672A3" style="border-collapse:collapse">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="28" align="center"><img src="myfolder/bullet.gif" runat="server" width="14" height="14" alt=""/></td>

<td><span class="style1"><a href="#">Contact Us </a></span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td colspan="2" align="center" valign="middle">&nbsp;</td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle" bgcolor="#CAE7FB"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="1"/></td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="10"/></td>

</tr>

<tr>

<td align="center" valign="middle"><img src="myfolder/bullet1.gif" runat="server" width="15" height="15" alt=""/></td>

<td width="133"><span class="style2">&nbsp;Latest News</span></td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="10"/></td>

</tr>

</table></td>

</tr>

<tr>

<td><span class="style11">Thank you for your interest.We welcome you to our site.<br/>

</span><span class="style4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="orange_link">more &raquo;</a></span></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td background="myfolder/dots.gif"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="2"/></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td><span class="style11">Our's is a growing level organization in the IT SECTOR. We are having four branches in chennai city. We are planning to open new one in Hyderabad also.<br/>

</span><span class="style4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="orange_link"></a></span></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td background="folder1/dots.gif"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="2"/></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

 

<tr>

<td><span class="style11">We are about to release one product which helps the users to gather information regarding various sectors like banking, health etc. <br/>

</span><span class="style4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="orange_link"></a></span></td>

</tr>

</table></td>

</tr>

<tr>

<td align="center" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td colspan="2" align="center" valign="middle">&nbsp;</td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle" bgcolor="#CAE7FB"><img src="folder1/spacer.gif" runat="server" alt="" width="1" height="1"/></td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle"><img src="myfolder/spacer.gif" alt="" width="1" height="10"/></td>

</tr>

<tr>

<td align="center" valign="middle"><img src="myfolder/bullet1.gif" runat="server" width="15" height="15" alt=""/></td>

<td width="133"><span class="style2">&nbsp;Latest News</span></td>

</tr>

<tr>

<td colspan="2" align="center" valign="middle"><img src="myfolder/spacer.gif" runat="server" alt="" width="1" height="10"/></td>

</tr>

</table></td>

</tr>

<tr>

<td><div align="justify" class="style11">You can select the location through maps and get whatever information you require.</div></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

</table></td>

</tr>

</table></td>

<td align="center" valign="top"><table width="92%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="35" style="width: 537px"><span class="style10">Welcome To Our Company</span></td>

</tr>

<tr>

<td class="style3" style="height: 514px; width: 537px;">

<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

</asp:contentplaceholder>

</td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><img src="myfolder/box_bottom.jpg" runat="server" width="761" height="7" alt=""/></td>

</tr>

</table></td>

</tr>

 

</table>

<div>

&nbsp;</div>

<table>

<tr>

<td align="center" style="height: 30px; width: 760px;"><span class="style11">Copyright &copy; 2006 Company Name Inc. All rights reserved. </span></td>

</tr>

</table>

</form>

 

</body>

</html>

pooya.m
Asp.Net User
Re: problem with master pages, solution plz12/26/2007 3:14:10 PM

0/0

if you application root is "http://someaddr/APP/" and your images located in the "http://someaddr/APP/images/" and you are using run at server image tag you have to use ~ sign instead of your application root :

 

<img src="~/images/blue.gif" runat="server" id="img1" > 


How nice - to feel nothing, and still get full credit for being alive
Jeev
Asp.Net User
Re: problem with master pages, solution plz12/26/2007 3:28:55 PM

0/0

The problem is because the path cannot be resolved. I suggest replacing regular images with asp:image and a relative path if you are using the same master page for content from different folders .The reason you are having problems with the background color is because of the same reason .The style sheet link path does not get resolved. I would strongly suggest taking a look at themes

http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx

 A quick and dirty way .. I do not recommend it is to add the css link via code behind

 Literal cssLink = new Literal();
            cssLink.Text = string.Format("<link href='{0}' runat='server' rel='stylesheet' type='text/css' />", ResolveClientUrl("~/myfolder/stylesheet.css"));
        this.Header.Controls.Add(cssLink);


 


Jeev
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you get the answer to your question, please mark it as the answer.
chaitanya_k
Asp.Net User
Re: problem with master pages, solution plz12/27/2007 10:03:20 AM

0/0

Thank you very much for your response.But the problem is not solved.If you get an other idea, plz share with me.

Rinze
Asp.Net User
Re: problem with master pages, solution plz12/27/2007 11:55:33 AM

0/0

check out this post.

U are using relative links to add stylesheets and images to your webpages, so what u are trying to do will only work of you include a <base href=http://yourwebsite/ />

A better solution would be to alter the links, so instead of <link href="myfolder/image.gif" rel="stylesheet" type="text/css"/> use <link href="~/myfolder/image.gif" rel="stylesheet" type="text/css" />. The runat=server attribute is not becessary because .Net will rebase the link elements for you anyway. This should work for images as well.

For all elements that do not support rebasing, like script tags for instance, you should use ResolveClientUrl(). It's explained in the link above.


Hope this helps !
Rinze

---------
please select 'mark as answer' if this post helped you!
Amanda Wang - M
Asp.Net User
Re: problem with master pages, solution plz12/28/2007 7:38:01 AM

0/0

Hi, 

chaitanya_k:

<link href="myfolder/StyleSheet.css" runat="server" rel="stylesheet" type="text/css" />

From the code, we can see you add the runat="server"  for the link, so i would suggest that you can try to use the css file's absolute path.

Foe example:

Below is my test code:

 <link href="~/App_Themes/StyleSheet.css" rel="stylesheet" type="text/css" runat=server />

"~" represents the root directory. It can work fine.

 

Hopwe 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
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:

Web:
Beginning ASP.NET 2.0 Master Pages are the latest and best solution to the question, ..... I want to apply Themes and skins in master pages but unable to do it..so plz help me. ...
Request.Form is not working with the Master Page (plz.... really ... So, if you guys know the solution of this problem or is there any ... when you use MasterPages, the id and name of the form fields change, ...
Brock Allen's Blog - ASP.NET 2.0 and Themes and Master Pages But specifically back to dynamically choosing Themes and Master Pages in one place in .... "barcellona-hostal plaza" (barcellona-hostal plaza) [Trackback] ...
Mohamed Sharaf's Blog : Inside ASP.NET Master Pages i have one problem with master pages,. Server controls are unknow if used in Master/Content pages. the server controls are showing in red underlined ...
Rad editor and Visual Studio Master Pages - telerik Forum We will examine your code and try to provide a solution. .... the head section of my master page how can I go about resolving the problem? ...
Dynamically Loading Master Pages in ASP.NET 2.0 NET 2.0 is Master Pages. Master Pages give you the ability to define a master page .... plz help. Irfan 5/4/2006 5:18 AM. Gravatar. My Problem Solved. ...
MasterPages Localization/Globalization & resources issue - ASP.NET ... I have same problem. Even user controls and web.sitemap have same bug (?) . .... could u mail me the project for localizating masterpages too plz? ...
Master Kitchen Solutions 66, Gem Plaza Infantry Road Bangalore ... Fill your requirements to Master Kitchen Solutions 66 Gem Plaza, Infantry Road Bangalore GPO, ... Yellow Pages. Select City. Please select the city. ...
Loading pages in IFRAME dynamically from codebehind - ASP.NET i want immidiate solution plz help me !! 9/22/2005 9:05 AM | shaan_26 .... It worked fine until I changed to using master pages, but then it stopped working ...
CleverWorkarounds » SharePoint Branding Part 6 - A "solution" to ... If any one of them has a problem, we can roll back the solution deployment, ..... SharePoint Branding - How CSS works with master pages - Part 1 says: ...

Videos:
Philip Pocock 100 Days 100 Guests event (Day 63) Documenta X 1997 Philip Pocock speaking at Documenta X about hypercinema and the collabortative work produced in Uganda by Documenta X - A Description of the Equator ...
Santa Monica Council Meeting Santa Monica Council Meeting
Long Beach City Council Meeting Long Beach City Council Meeting




Search This Site:










how to skin a fileupload control/

how do i stop the entire master page from posting back when using a menu ?

javascript in content page

how to leave the white spaces at left and right of the web without affecting the contents in the middle?

dot net menu

header content in masterpage question...

links in masterpage - how to determine which one was clicked

sitemap & treeview problem

getallnodes() from a sitemapnode object throws invalidcastexception

using a master page, how can you have different header images for different pages that are outside of the content placeholder?

call functions many times in my pages!!!

quesry string?

the provider 'sitemapdatasource1' specified for the defaultprovider does not exist in the providers collection.

asp.net 2.0 treeview node custom javascript?

problem with masterpage

button click event

browser incompatibility mapped and treeview control

treeview bug ! error when try to display non-english characters

sitemapdatasource and adding menu items dynamically ?

scrollbars for contentplace holder

menu control static item backgroung

reference controls in masterpage from class in app_code

front controller

treeview looses focus

clickable area in a menuitem

sitemapnode denying users (not allow) - security trimming

menu

iis and masterpages?

sitemap menu - parent node with no url

height of page

  Privacy | Contact Us
All Times Are GMT