CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/19/2007 8:23:31 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 8 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
troy_xp2
Asp.Net User
Issue with Images and Themes12/19/2007 8:23:31 PM

0/0

I may be completely off the mark here, but my understanding was that one of the features of using Themes is that it allowed you to have an images folder (per theme) and in code you would not have to change the image url (or src).  Only set the theme to be used.  I currently have x2 themes w/ image folders.  I'm setting the theme property in the Page_PreInit event.  But unless I use the full image path (ex. App_Themes/Theme_1/images/xxx.png) it will not work.  I was under the impression that this would work:

 
<img src="images/xxx.png" runat="server" />  (I have tried every variation - /images and ~/images, etc)

 

Any help greatly appreciated. Thanks
 

avci
Asp.Net User
Re: Issue with Images and Themes12/19/2007 8:40:56 PM

0/0

 you should use full path. like you did

App_Themes/Theme_1/images/xxx.png


Click ?Mark as Answer? on the post when it helped.

surfer5
Asp.Net User
Re: Issue with Images and Themes12/20/2007 12:33:39 AM

0/0

You do have to use the full path, which may seem like it negates this coolness factor. HOWEVER, there is a way to get around it (isn't there always?). Smile

What you need to do is (if you can) insert a code snippet in the URL for the image source and make the theme folder dynamic (based on the currently applied theme). Something like this should work:

 

<img src="App_Themes/<%= Page.Theme%>/images/xxx.png"/>
  

 

Your other option would be to include the images in the theme directory and then create a skin file that maps something like an image control to your image. Then, in your page, add the image control to your code and reference the skin ID you created in your skin. If you do that, when the skin changes, so will the images. Now, if you have a LOT of images, this won't be desirable because, using this solution, you would have to create a new SkinID instance for every image. But its doable (and, if you only have a few images, like a header image for example, then this might be a good solution).

Hopefully one of those approaches will help you ou.

-Jacob






Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages
by Jacob J. Sanford


troy_xp2
Asp.Net User
Re: Issue with Images and Themes12/20/2007 1:01:29 AM

0/0

 Thanks for the help. I think Jacob's approach will work.

4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Trials: Strategy, Skills, and the New Power of Persuasion Authors: Thomas A. Mauet, Pages: 621, Published: 2005
Popular Music Perspectives: Ideas, Themes, and Patterns in Contemporary Lyrics Authors: B. Lee Cooper, Pages: 213, Published: 1991
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Images, Issues, and Attacks: Television Advertising by Incumbents and Challengers in Presidential Elections Authors: Edwin D. Dover, Pages: 179, Published: 2006
Virtual Individuals, Virtual Groups: Human Dimensions of Groupware and Computer Networking Authors: Jo Ann Oravec, Pages: 389, Published: 1996
Postmodernism and the Holocaust Authors: Alan Milchman, Alan Rosenberg, Pages: 325, Published: 1998
Thematics: Interdisciplinary Studies Authors: Max Louwerse, Willie Van Peer, Pages: 448, Published: 2003
Reader's Guide to Lesbian and Gay Studies Authors: Timothy F. Murphy, Pages: 720, Published: 2000
Media Madness: Public Images of Mental Illness Authors: Otto F. Wahl, Pages: 260, Published: 1997

Web:
Problem with Images on Vote Posts :: General Theme Discussions ... Now after purchasing a new theme, I see that it is not mine. If you have a poll in a forum post, there are 4 images missing from the corners of the poll ...
WordPress › Support » Mandigo Theme - Keeps Resizing Images I do wonder if it isn't a theme problem causing that, but the normal action ... Mandigo 1.37 which I said would include a fix for the issue with images has ...
Issue with Utilizing custom rotoar images - DIY Themes Forums I am trying to setup a custom rotator link and it appears that there is a small issue with my server not allowing to run a function. * Always Give Us.
Menu has two different
  • images for themes that are not garland ... When using a theme that is not Garland, for any menu items present in ... and the other is the image used by the theme. I see the issue with ...
    Mambo Image Problem Open Discussion about Mambo Image Problem The Themes images - HIGLIGHTS: image, mambo, file, upload, random, link, server, style, joomla, ...
    Image Problem - Followed the tutorial Support Forum » Free Premium ... I have installed your theme in my other 2 site without any problem, even the image laod. All i can think the only difference is the WP version i use. ...
    CPG Dragonfly™ CMS ⇒ Forums ⇒ DragonflyCMS ⇒ Themes ... Forums ⇒ DragonflyCMS ⇒ Themes ⇒ Occassional problem with Images in FF ... In your theme, you've got the background images coded into the
  • tags ...
    Problem trying to add an image with hooks - DIY Themes Forums I'm making this practice site to try different hooks out. I have a bullseye image that i'm trying to place using hooks. Here's the code in the.
    [Instantrails-users] Typo 2.6.0: Typo Themes missing graphics ... The issue, two images folders, one in public and one in the theme. Here are the Third Try steps: 1) From a previous older post To get the admin stylesheet ...
    zenphoto forums album.sort_order in RSS Feeds issue, 5, sbillard, 6 hours ... Installation Support – For help on installation of zenphoto or themes. 1201, 6766 ...

    Videos:
    The Marriage Circle This video is a SUBTITLE PARODY. Also there are some still pic sequences. It CONTAINS YAOI IMAGES and themes as well as SOME EXPLICIT TEXT. This i...
    What Do Those Images Have In Common? Google Tech Talks March, 25 2008 ABSTRACT This talk is about discovering and modeling previously unspecified, recurring themes in a given set of ar...
    Wolfblade Character Themes Summary on Wolfblade... In a world where humans are hunted by demons, and serve as slaves to the almighty(or angels). Elynna, a girl with a forgotte...
    "Eco-Loco" - Ecological Artmaking: A Community Project For ten weeks, over 30 community members of all ages came together to collectively create an art installation/performance piece based on local enviro...
    Public Image Limited. - Theme For some reason windows media player thinks this track goes for 17 minutes instead of its actual running time of 9 minutes and so it stretches the tr...
    Will I Be Next? Will I Be Next?" is a film that explores the issue of gun violence. Five established experts and numerous young people were interviewed for their pe...
    Minuteman Stamps, Coins & Currency DVD Preview - biblestamps.org This DVD is our free "thank you" gift for supporting our petition drive and helping to spread the word about the need for NEW patriotic Minuteman sta...
    Magazine BLU Fashion Shoot Outtakes ~ Fall 2007 Issue The Magazine BLU team flew down to Texas for a fashion shoot on the theme of "Relaxed and Easy Denim" for fall. This video shows the outtakes of that...
    Camera Travels A video that discusses the ability of images to exercise social criticism, given the power that the producers of such visual (or other) discourse pos...
    Generate Traffic with Video Marketing | TrafficGeyser | Software | Upload | Viral | Tool Looking for a solution to generate traffic? Video Marketing is the answer, and TrafficGeyser is the tool! TrafficGeyser automatically uploads web m...




    Search This Site:










    master page with user control causes master page_load to fire twice!

    color coding source code

    spaces between horizontal dnn menu

    windows authentication in intranet

    having administrators of your website use the web site admin tool

    keep getting 404 errors - i'm confuddled!

    i'm having a helluva time registering a custom sitemap provider.

    programmatic control of validation?

    web.config problem. should be easy.

    3.0.6 container min max issue?

    getting started....

    bug report dnn 3.012: banner module

    error hresult e_fail has been returned from a call to a com component

    online store- help

    building a class library - newbie question

    retrieving byte array from database

    difference between forms authentication and windows authentication

    system.io.filenotfoundexception occurs when uploading an image

    what is addparsedsubobject ?

    user.identity.name is getting ha

    how to implement club web site starter kit into visual studio?

    .csproj file corrupted

    file download problem

    building websites with vb.net and dnn 3 question

    how to secure ibs store management pages.

    .aspx page html cache disable doesnot works

    entity diagram

    setting up live site with asp:login db

    loading the default page

    " character in a string

     
    All Times Are GMT