jQuery无法在asp.net中找到控件ID

jQuery无法在asp.net中找到控件ID

问题描述:

$(#<%= 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();
};

是我在asp.net页的jquery中的代码,我无法获取控件RadioButtonList2的ID.

$("#<%=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.

(this).val()=="DC")
{
(this).val() == "DC")
{


(#trAmount").show();
("#trAmount").show();


(#trBankName").show ();
("#trBankName").show();