1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Images

4 posts, 0 answered
  1. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    17 Jan 2011
    Link to this post
    Hi,

    I'm trying to set a background image to my masterpage.
    The code is as followed:

    </fieldset>
        </form>
        <img alt="EGZ" src="App_Data/Sitefinity/WebsiteTemplates/Egz/App_Themes/Egz/Images/bg-body2.jpg"
            class="background" />
    </body>
    </html>

    I'm not able to get a background image? Where should I store images? Maybe not in the App_Data?

    Greetings,
    Daniel
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Jan 2011
    Link to this post
    Hello Daniel,

    You can refer your images in the stylesheet. Create a stylesheet in Global folder ( this will register it automatically); Then create an Image folder on the same level as Global folder.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    17 Jan 2011
    Link to this post
    Okay. I worked with an ASP control:

    </fieldset>
        <asp:Image ID="background" CssClass="background" runat="server" ImageUrl="~/Sitefinity/WebsiteTemplates/Egz/App_Themes/Egz/Images/bg-body2.jpg" />
        </form>
    </body>
    </html>

    But if I want a default <IMG> tag outside the <FORM> tag, what would be the URL? (since I can't use the '~' then...)

    Regards,
    Daniel
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    17 Jan 2011
    Link to this post
    Hello Daniel,

    You should try with /Sitefinity/WebsiteTemplates/Egz/App_Themes/Egz/Images/bg-body2.jpg or Sitefinity/WebsiteTemplates/Egz/App_Themes/Egz/Images/bg-body2.jpg. If you are running in the context of a Sitefinity website the link should be resolved.

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered