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