Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. AJAX Panel control

AJAX Panel control

Scheduled Pinned Locked Moved ASP.NET
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eyeseetee
    wrote on last edited by
    #1

    Hi I have the below code and what I would like it to do is when I click on the button a panel will appear, click on it again and it will dissapear. Thats all but the below code doesnt seem to work can any1 point me in the right direction? thanks fdgdfgdfg

    N 1 Reply Last reply
    0
    • E eyeseetee

      Hi I have the below code and what I would like it to do is when I click on the button a panel will appear, click on it again and it will dissapear. Thats all but the below code doesnt seem to work can any1 point me in the right direction? thanks fdgdfgdfg

      N Offline
      N Offline
      newc1
      wrote on last edited by
      #2

      Have you thought of using JavaScript and not using the UpdatePanel control at all? From experience the UpdatePanel is not a great control and if all you are looking to do is toggle the display of a block-level element, then the following would be far easier in my opinion: Your JavaScript... function toggleDisplay(toggleDiv) { toggleDiv = document.getElementById(toggleDiv); if (toggleDiv.style.display != 'none') toggleDiv.style.display = 'none'; else toggleDiv.style.display = 'block'; } Your HTML... <asp:Button OnClientClick="toggleDisplay('toggleDiv'); return false;" ID="btn_search_by_area1" runat="server" Text="Search Sub Dep." /> <div id="toggleDiv"> ghjgjhgg </div>

      Clean code is the key to happiness.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups