We help IT Professionals succeed at work.

How to use <asp:DropDownList> to change/show css <div>

MikeCombe
MikeCombe asked
on
308 Views
Last Modified: 2012-06-04
I use an include file called inc_logo.aspx in my default.aspx webpage.
When a user clicks on a dropdown box in default.aspx, I want to change a logo on
default.aspx....depending on the item selected in the dropdown box. The dropdown box
code is in code-behind in default.aspx

During the user clicks on default.aspx, I set session variables.
I don't think that is the best way to make my logo change.
Any ideas as to how I can change my logo more directly ?

Here's the code in the inc_logo.aspx webpage:
 <%If Not Session("curTown") = "" Then%>
    <div class="LogoTown"></div>
 <%Else%>
     <%If Session("curState") = "" Then%>
           <div class="LogoUSA"></div>
     <%Else%>
           <div class="LogoState"></div>
    <%End If%>
 <%End If%>
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
a better solution
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.