Click here to Skip to main content
16,011,428 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: GridView Rows Formatting Pin
minhpc_bk20-Apr-06 16:04
minhpc_bk20-Apr-06 16:04 
QuestionInternal .Net Framework Data Provider error 1 Pin
Research20-Apr-06 12:35
Research20-Apr-06 12:35 
QuestionDownload file(s) from server Pin
dr S.A.f.20-Apr-06 11:42
dr S.A.f.20-Apr-06 11:42 
AnswerRe: Download file(s) from server Pin
dr S.A.f.20-Apr-06 23:02
dr S.A.f.20-Apr-06 23:02 
AnswerRe: Week only Calendar Pin
Mike Ellison20-Apr-06 14:41
Mike Ellison20-Apr-06 14:41 
QuestionWSE3 & MTOM Pin
hung_ngole20-Apr-06 7:08
hung_ngole20-Apr-06 7:08 
QuestionCreate User Wizard Control...SOS Pin
DotNetDominator20-Apr-06 6:22
DotNetDominator20-Apr-06 6:22 
AnswerRe: Create User Wizard Control...SOS Pin
SABhatti20-Apr-06 10:33
SABhatti20-Apr-06 10:33 
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..

-----
QuestionUsing ASP with Access... Pin
grousedog20-Apr-06 6:05
grousedog20-Apr-06 6:05 
AnswerRe: Using ASP with Access... Pin
Guffa20-Apr-06 8:40
Guffa20-Apr-06 8:40 
QuestionWeb service namespace Pin
hung_ngole20-Apr-06 6:00
hung_ngole20-Apr-06 6:00 
AnswerRe: Web service namespace Pin
minhpc_bk20-Apr-06 16:09
minhpc_bk20-Apr-06 16:09 
GeneralRe: Web service namespace Pin
hung_ngole20-Apr-06 17:33
hung_ngole20-Apr-06 17:33 
GeneralRe: Web service namespace Pin
minhpc_bk20-Apr-06 18:01
minhpc_bk20-Apr-06 18:01 
GeneralRe: Web service namespace Pin
hung_ngole21-Apr-06 6:07
hung_ngole21-Apr-06 6:07 
AnswerRe: Web service namespace Pin
jitendra gupta20-Apr-06 21:51
jitendra gupta20-Apr-06 21:51 
GeneralRe: Web service namespace Pin
hung_ngole21-Apr-06 6:09
hung_ngole21-Apr-06 6:09 
Questionneed to make Chat public only .. Pin
coolshad20-Apr-06 5:35
coolshad20-Apr-06 5:35 
QuestionHow to make Web Application more Secure in Asp.Net???? Pin
pal_vaidya20-Apr-06 4:14
pal_vaidya20-Apr-06 4:14 
AnswerRe: How to make Web Application more Secure in Asp.Net???? Pin
SABhatti20-Apr-06 10:46
SABhatti20-Apr-06 10:46 
QuestionValidators not getting fired Pin
Manoj Sethi20-Apr-06 3:59
Manoj Sethi20-Apr-06 3:59 
AnswerRe: Validators not getting fired Pin
Rakheesh Chalil20-Apr-06 10:02
Rakheesh Chalil20-Apr-06 10:02 
GeneralRe: Validators not getting fired Pin
Manoj Sethi21-Apr-06 2:30
Manoj Sethi21-Apr-06 2:30 
QuestionProfile Pattern Pin
Daniel Negron20-Apr-06 3:43
Daniel Negron20-Apr-06 3:43 
AnswerRe: Profile Pattern Pin
minhpc_bk20-Apr-06 16:38
minhpc_bk20-Apr-06 16:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.