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. Create User Wizard Control...SOS

Create User Wizard Control...SOS

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.
  • D Offline
    D Offline
    DotNetDominator
    wrote on last edited by
    #1

    Is there any way to Hide "Create User" buttom?? I want to Hide this button when a value from a drop down is selected. That time i want to display Edit User Button!! Thanks in Advance.

    S 1 Reply Last reply
    0
    • D DotNetDominator

      Is there any way to Hide "Create User" buttom?? I want to Hide this button when a value from a drop down is selected. That time i want to display Edit User Button!! Thanks in Advance.

      S Offline
      S Offline
      SABhatti
      wrote on last edited by
      #2

      you can do it in two ways: 1. (preferably this) on client using javascript: add onchange attribute to dropdownlist and call a javascript function showHideButton like.. add attribute in code behind: dropdownlist.attributes.add("onchange", "javascript:showHideButton(this.selectedIndex);") javascript: function showHideButton(index){ if(index > 0){ // i am assuming you have --NEW-- at zero index document.getElementById("createuser").style.visibility = "hidden"; document.getElementById("createuser").style.display = "none"; document.getElementById("updateuser").style.visibility = "visible"; document.getElementById("updateuser").style.display = "block"; } else { document.getElementById("createuser").style.visibility = "visible"; document.getElementById("createuser").style.display = "block"; document.getElementById("updateuser").style.visibility = "hidden"; document.getElementById("updateuser").style.display = "none"; } } in the above case you have to create two buttons and hide one on loading of the page.. i suggest you to create only one button and change its text to Create User ot Update user on changing the value of list... on click event of button in code behind check its text and act accordingly.. 2. on server side: set autopostback=true for the dropdownlist. then write a onselectedindexchanged handler in code behind and set visible=true or false for each button depending on selected index of the dropdownlist.. -----

      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