.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

background-image sitecollectionimages path

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :SharePoint

I am trying to see , if the subsites can access the banner image, can some one let me know, if the below string is right, it is not working forme

background-image: url("<asp:Literal runat='server' Text='<%$SPUrl:~SiteCollection/SiteCollectionImages/header_0_0_1174x180.jpg%>'/>");

View Complete Post

More Related Resource Links

how to make a css style background image be linked to an image in the resource file


hey guy, i need help in a very troubling matter. I want to make a textbox with a specific style, within this style a set of images as background parts, how can i attach these images to the custom control as whenever i take the .dll file and add it to the toolbar the images do not appear. So i tried to make them as resource files and their property as embedded in .resx file, so how to make the css style background image url to be linked to any of those image.

thanks in advance

Setting webpage/masterpage background...image?


I want to have the background of my masterpage (the master page for all of my .aspx pages) have a sort of gradient.  I imagine the only way I can do that is with an image.  Or maybe even some other design, but I want to move away from the "solid color" background.

Is the easiest way to do this just to make an image and set that as the background?  What image size should I make it, because some users could possibly have the normal aspect ratio, or maybe a widescreen?  What should I make it like so that it looks good on all computers?

Thanks in advance. :) 

Label can be seen but not the hyperlink over this background image



I have a panel like this. I have an image control inside this panel that I have put as a background image for the panel using the style where I adjusting the z-indexes.

This works fine!

I have put a label and a hyperlink like this in the <table>. The label can be seen but not the hyperlink which is the problem. I have tried to put a z-index to the hyperlink but that does not help.

How is it possible to see the hyperlink here also ? Thanks!


            top: 0px;
            left: 0px;

.stretch2 img
    position: absolute;
            top: 0px;
            left: 0px;

.stretch2 span
    z-index: 100;
    font-size: 1.2em;
    color: #ffff66;
    font-family: Arial, 'Microsoft Sans Serif';
            top: 0px;
            left: 3px;

<asp:Panel ID="Panel6" CssClass="stretch2"  runat="server" Width="100%">
    <asp:Image ID="Image16" runat="server" AlternateText="" ImageUrl="~/images/setImage.jpg" 
        ForeColor="Black" />

    <table style

Background image of Anchor not working with Safari/Firefox

Hi, I have following Css where i have used back-ground image. Then i am generating Anchor and assigning css class which has image. It works fine with IE but does not work with Safari,Firefox and Chrome. Can anyone help me on how to fix it. I have given details below. Thanks, Chandan Css .HOME { BACKGROUND-IMAGE: url(../images/home.jpg); WIDTH: 56px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 20px } .HOME A { WIDTH: 56px; HEIGHT: 20px } .HOME A:hover { BACKGROUND-IMAGE: url(../images/home1.jpg); WIDTH: 56px; HEIGHT: 20px } Html Code<td class="home"> <A href="#" class="home" onclick="showpage('abc.html')"/></td>

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

Upload image to database - couldn't find file path

I'm trying to display images in a GridView (yes, still this...). [edit] Before I can come to that I have to upload some images to the database.I've followed this tutorial for the "upload image to database" code (this worked fine for uploading images, but I don't know if the images were converted to byte):http://aspsnippets.com/Articles/Save-Files-to-SQL-Server-Database-using-FileUpload-Control.aspxand I've followed this tutorial for the "display images in gridview" code (and "retrieve file" from the tutorial below).http://www.aspsnippets.com/Articles/Display-images-from-SQL-Server-Database-in-ASP.Net-GridView-control.aspxIt doesn't quite work, the GridView shows but without imagesNow I'm trying to change the "save file" code according to this tutorial:http://aspsnippets.com/Articles/Save-and-Retrieve-Files-from-SQL-Server-Database-using-ASP.Net.aspxbut I don't understand everything in it. When I try to upload an image I get an error on this line:FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read); //couldn't find file (path to image I tried to upload) What should I do about it?

background image

Hiii Coders, I m using div inside my html link. Now i want that there should be a background image which should cover my whole div. How can i get it? Is there any kind of article that will make things clear. plz rep as soon as poss thanx and regards  

Alternative coloring and Image background color

Hi        I wanted to simple create a report with alternative background colors. Which I could achieve easily. Now I have a column in this report which is supposed to display image. Based on value from the data field a red or green or blue icon is displayed in this column based on expression. Which is also working fine. Now the problem is after I place an image in this details column (with or without expression).  the alternative row coloring stopped working. its always white. I even tried creating a colored background image and still its not helping. Can some one help me out please? If the question is still not clear, please let me know.... for Screenshot please refer http://binabdu-fayaz.blogspot.com/2010/09/alternative-coloring-and-image.html Thanks a lot. Fayaz  

Background Image not dispaly in Outlook 03+

Hello friends,I have a problem of email compaign, as i send one template in email in asp.net c#  with html body in mail content, its look too good in web email(yahoo,gmail,msn etc..) but it doesnt display background image  in outlook. Also I have set full path of that image. Is there any things??Thanking you.Krunal

How to Stop background image from scaling

I need a WPF window that has a background image and I desire it not to scale beyond a certain point or maybe even at all.  I am trying to duplicate the image effect of this site...  http://richardpwalton.co.uk/ - When you scale the window it only scales down so far and then starts to clip but I don't know how to do that in WPF. Any suggestions? yes i am relatively new to WPF :)

Use drawn path as a background

Hi, I'm currently learning WPF as quickly as possible to support a graphic designer in building UIs in Expression Blend for a new application. I haven't yet gotten far enough to know how to do this though. We're designing a main form which holds a Grid that has 2 rows. The first row is a header, the second row will be a workspace for numerous different user controls. We'd like the bottom left of the form to have a path element that basically acts as the background of the form. The user controls in the second grid row should be able to overlay the path. I'm trying to avoid images so that the path can proportionally re-size with the form. Can this be accomplished without using a Canvas and how?

Background image in Repeater control

Hi, I have a repeater control:<asp:Repeater ID="Repeater3" runat="server" DataSourceID="SqlDataSource4">                <HeaderTemplate>                </HeaderTemplate>                <ItemTemplate>                    <div >                        <div style="background:url('<%# Eval("HomeSlideBgImage")%>') no-repeat top center" >                        <%# Eval("HomeSlideBgImage")%>                            <h2 id="welcome-heading">                        

How to make background-image of table or panel Rounded ?

Hi, I have taken background-image of a Table and Panel, that image's corner is rectangula. How can i make its corners Rounded ? I searched some online resources, images were made rounded, how to make make background-image rounded on the fly ? 

User selectable background image for Form.


I have played around with the BackgroundImage option in C# and it works very well. My question is related to having the user select the image that will be the "Skin". Does anyone have or know where to find a good sample application that does something like this?

Thank you!


Stretch the menu (horizontal) background-image across the page


 I would like to continue my background image to the right end of the content holder and keep the menu items over on the left of the content holder.  Does this make sense?  For example, my menu items are dynamically loaded.  Sometimes I have only two (Guest and Member).  Right now my background image ends rignt after the "Member" item but I want the image to continue across the page.  It is important to note that setting the "width" property in the CSS stretches the items across the page and this is not what I seek.  Here's a bit of code.

/* Menu Styling */
   background-image: url(../../images/bavbg.gif) no-repeat;


#menu .Item
  /* CSS class for non-selected Menu Item */
  border:Solid 1px Gray;
  background-image: url(../../images/bavbg.gif);

#menu .ItemSelected
  /* CSS class for selected Menu Item*/
  background-image: url(../../images/bavbg.gif) no-repeat;

#menu .ItemHover
  /* CSS class for hovering Menu Item*/
  background-image: url(../../images/bavbg.gif) no-repeat;

/* CSS classes for standard Links, only valid inside the #menu DIV */
#menu a, #menu 

Initialize background image url in css file into custom server controls



i registered an image in AssemblyInfo.cs like this:

[assembly: WebResource("MyControl.Icons.bold.png", "image/png")]


protected override void RenderContents(HtmlTextWriter output)
            output.Write("<p class='BoldButtons' onclick='event4()'>event4 </p>");

now i want to initialize that image in css file for background-image but it dose'nt work.

my css file is:

	background-image: url("MyControl.Icons/font_bold.png");
	border: 0px; 
	height: 21px; 
	width: 21px;

i also try with this :

background-image: url(<%=WebResource("MyControl.Icons.bold.png")%>);

but it dose'nt work.

please help me? 

Hyperlinks in TD Background Image



I have created a table with background images. I want to insert hyperlinks in one of the cell backgrounds. I am unable to find the use map parameter for TD background images. Below is the code.

<table width="950px" border="0" cellpadding="0" cellspacing="0">
                <td width="37px" height="124px" style="background-image: url(images/UpdatesBackground_01.jpg)">
                <td width="881px" height="124px" style="background-image: url(images/UpdatesBackground_02.jpg)">
                <td width="32px" height="124px" style="background-image: url(images/UpdatesBackground_03.jpg)">

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