473,779 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing images and CCS dynamically?

I’m working on a C# ASP application in which they want to give the users the
ability to pic their color themes. Each theme has its own folder and the
images for each theme are named the same So that in theory, all I need to do
is dynamically change the scr tags of all the non server side images to be
the name of the folder.
Ex: <image scr=’/images/[theme]/leftcorner.jpgâ €™/>

I’ve been pondering the best solution to make this work and I would
appreciate any insight you guys can provide.

Couple of questions:

1. Can make all the images sever side controls and change them in C#, but
this seems like overkill on ViewState in PostBack

2. Can you put <%=Request()% on the html tags so they can evaluated at the
server? I Kida like old ASP I tried this and it didn’t work, can this be
accomplished? My theory was that will all those requests would be processed
on the server, it would not affect the ViewState since it doesn’t have to
send AND receive the values, just reprocess the request each time. Am I wrong
in this thinking?

3. Can I define all my images in the CSS for each theme? I tried this, but
the images do not display when CSS is applied. I could only find
background-image tag in the style sheet. Is their another tag or element I
need to use
--
JP
..NET Software Developer

Apr 20 '07 #1
0 1096

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2225
by: antishok | last post by:
Hi, I'm writing a page which has a somewhat similar folder tree to that of the windows explorer, where each folder is made of a <SPAN> tag consisting of the folder image (closed or open) and the folder name. When certain actions are performed by the user, more folders (spans) are dynamically added using javascript function appendChild(). I add a new folder span to a container span which holds the whole tree.
5
1379
by: Apple Sauce | last post by:
I'm building a site that requires images to be placed into a table dynamically - the name of each image is drawn from a database reference. (e.g database entry is "images/image1.jpg" etc). The problem is that when an image is dynamically inserted in this way (infact its only the location of the file thats dynamically rendered - not the image itself), i have a 2-3 pixel gap at the bottom of each image. Non dynamically attached images do not...
23
2693
by: Wade | last post by:
08122005 1505 GMT-5 Hello. I am working on a webpage for the local school (just before school starts). Their outside hired company really screwed things up. Im trying to get their computers up and running and gain access to their apps for them. There is this code that flips through images for World History class. I have removed the code from the page but the page still does not function.
0
1312
by: Carl Gilbert | last post by:
Hi I am working on a site using ASP.NET, VB.NET and SQL Server. I have a page that displays images, and I want to display additional links to other images within the same category. When the page loads I know how many pages are in the current category and the current page (set of images to display). The images are displayed in groups of 8 but a category may have more than 8 images. To provide a way to view other images in the...
5
1913
by: Jerry Camel | last post by:
I am interacting with an OCX on the client side. In the Onload event of the page, I am checking a property of the OCX: Is the port open or closed. If the port is open, I want a certain image to appear. If the port is closed, a different image. Sounds pretty straight forward. Since this is dependent upon a property of a client side component, I can't do this with VB .net on the server, right? So I was trying to use vbscript on the...
3
3947
by: drjackk | last post by:
Hello, I'm trying to change the onmouseover event dynamically. This sets-up the initial onmouseover event: <a href="home.html"> <img border="0" id="img22" src="images/home1.jpg" height="15" width="85" alt="Home" onmouseover="FP_swapImg(1,0,/*id*/'img22',/*url*/'images/home2.jpg')"</a>
7
3648
by: petethebloke | last post by:
Can anyone help? I have a client who has made a "dynamic interactive map" of our city using Dreamweaver. Each map file has hotspots that pop-up a div with a little image when the mouse goes over them. They also link to another file. I've converting the application to a PHP-AJAX system at http://www.ilex-urc-maps.com/testing.html but I can't get the dynamically altered hotspots to work. Any ideas? Please don't tell me that the client...
1
1520
by: hellohi | last post by:
Hello Everyone, I wanted to change the existing variable names dynamically.( like www.aol.com ) in this site images and some text is changing dynamically. like wise i need javascrip to write Thanks in advance
5
1781
by: letshin | last post by:
Hello! I have been trying to write a script that changes the title tag of my images. This is because I'm using a script to generate an image gallery, which I linked to a lightbox. I need to put a caption to the images cause well, I think the visitors would like to know what they're looking at :p/ Thing is, I am absolutely clueless now. I have a vague idea though, which is basically to have a text file containing lines with things like, ...
0
9632
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10136
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7478
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5501
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.