Wrox Programmer Forums
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 19th, 2009, 10:21 PM
Authorized User
 
Join Date: Jan 2009
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change <div> content

I have three images on my webpage that comprise an small interface. When the page loads, the first picture is in focus and to the right is an explaination. When the user clicks on a different picture, I would like to change the text of the div. I have tried adding code to the code behind page, but I can't figure out how to make that work. I am new to this and am getting my hands around the VB coding. Any direction would greatly help.
 
Old April 20th, 2009, 07:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hello, Unless you show us something, I don't know how we can help you...
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old April 20th, 2009, 09:49 PM
Authorized User
 
Join Date: Jan 2009
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry, this is what I have so far

Code:
<div id="Nav">
              <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="about.aspx" 
              <img alt="" src="Images/about.jpg" style="width: 171px; height: 28px" />
              </asp:HyperLink> 
              <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="prices.aspx" 
              <img alt="" src="Images/prices.jpg" style="width: 171px; height: 28px" />
              </asp:HyperLink> 
              <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="contact.aspx" 
              <img alt="" src="Images/contact.jpg" style="width: 171px; height: 28px" />
              </asp:HyperLink>               

</div>
<div id="ContentArea">
               <cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server"                
                TargetControlID="MoreInfo" 
                CollapseControlID="Less" 
                Collapsed="True"
                TextLabelID="More"
                SuppressPostBack="true" Enabled="True" 
                ExpandedImage="Images/blank.gif" 
                ExpandControlID="Image1" CollapsedImage="Images/more.gif" 
                ImageControlID="Image1">
                </cc1:CollapsiblePanelExtender>
            
               <div class="contentInfo1" runat="server">
     
             <p> This is all about us.
  </p>
      
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/more.gif" />
               </div>
              <div class="contentInfo2">    
              
  <asp:Panel ID="MoreInfo" runat="server" Class="moreInfo"> 
  
              <p> This is more about us. 
   <asp:Label ID="Less" runat="server" Text="[Less]" CssClass="link"></asp:Label>
       </p>
                </asp:Panel>
</div>
I would like to add the functionality that when the user clicks on the hyperlinks, the Content Area information changes depending on which Hyperlink they click. This is a small interface within the main page.
 
Old April 20th, 2009, 09:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Unless I'm missing something, your hyperlinks navigates to other pages, maybe you need a standard button??

Also, if you are using ajax (like I think because you have a collapsible panel), then the solution is at code behind, setting the image to the new link. (or you can do it with js at client side, but I don't know how).
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
hide the <div> crmpicco Javascript How-To 1 August 22nd, 2005 09:43 PM
disable <div> content (everything inside it!) crmpicco Javascript How-To 2 April 12th, 2005 09:35 AM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
sizeable <div> johnjohn Javascript How-To 1 December 8th, 2004 08:28 PM
<A><DIV><TABLE></DIV></A> anshul HTML Code Clinic 2 July 17th, 2004 02:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.