Click here to Skip to main content
15,886,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
$("#<%=RadioButtonList2.ClientID %>").change(function() {
if($(this).val() == "DC")
{
$("#trAmount").show();
$("#trBankName").show();
$("#trTransNum").show();
$("#trDepName").show();
$("#trCardNumber").hide();
$("#trCVV").hide();
$("#trHolderName").hide();
$("#trBeneficiaryName").hide();
$("#trWaiverReason").hide();
$("#trAmountToBeWaived").hide();
$("#trComments").hide();
};

is my code in jquery in asp.net page, I am unable to get the id of the control RadioButtonList2. It doesnot give any error either.
Posted
Updated 20-Jul-10 20:10pm
v2

1 solution

Have you looked at the source code that's generated to make sure it expands the way you expect ? Why not put (this).val() into a message box to see if it's DC, dc, or something else ?
 
Share this answer
 
Comments
Shining Legend 21-Jul-10 3:10am    
i checked the source, i see that it is generating the id of the control, how can i get name of the control.
Shining Legend 21-Jul-10 3:30am    
since it was giving the id of the control I changed clientID to UniqueId so that It returns the name of the server control and the code is working fine.
Shining Legend 21-Jul-10 3:30am    
Reason for my vote of 3
helped me trace for error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900