Bitmask
Bitmask

Reputation: 958

Radiobuttonlist - Access Click/change using jquery and reading values (rbList values are bound using binding)

I am trying to access the value of the radio button option selected by the user. The radio buttons in the radio button list are generated by binding using datasource

radioButtonList.DataSource = data;
radioButtonList.DataBind();

Now I want to check the value of the selected radio button and do something after. I can generate an alert message but i am not able to get the value of the selected radio button

$('#<%= rbDepartment.ClientID %>').change(function() {
    alert("working!");
  }).change();

Can someone show me how to ge the value of selected radio button.

Thanks, Madhav

Upvotes: 0

Views: 883

Answers (1)

slobodans
slobodans

Reputation: 859

var value = $("input[@name=GroupName]:checked").val();

Upvotes: 2

Related Questions