Ashwini Nayak Ashwini Nayak - 7 months ago 31
jQuery Question

How do I concatenate my element id in this scenario?

How can I get the selected text for a drop down in the below scenario?

var abc = $("#ddlReason"+bidId+"option:selected").html();

As you see above, "bidId" is a variable that I need to suffix with the dropdown id "ddlReason".

string.Format("#{0}{1} option:selected", ddlReason, bidId);

this will build your string the way you want it.