Aniruddh Kewat

Aniruddh Kewat

  • NA
  • 30
  • 9.8k

when linkbutton is clicked, radiobutton list is not alerting

Jun 27 2015 5:13 AM

<script type="text/javascript">
var pageindex = 1;

$(function () {
$('[id*=rblpricerange] input').unbind().click(function (e) {
var val = $('[id*=rblpricerange]').find('input:checked').val();
alert(val);
});
});

</script>

</head>

<body>

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
<ContentTemplate>

<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">LinkButton</asp:LinkButton>
<asp:Label ID="Label1" runat="server" Font-Size="25px" ForeColor="Green">1</asp:Label>

<asp:RadioButtonList CssClass="crblpricebrands" ID="rblpricerange" runat="server" AutoPostBack="True" Font-Size="1em" Width="100%">
<asp:ListItem Value="1">Rs.2000 and Below</asp:ListItem>
<asp:ListItem Value="2">Rs.2001-Rs.5000</asp:ListItem>
<asp:ListItem Value="3">Rs.5001-Rs.10000</asp:ListItem>
<asp:ListItem Value="4">Rs.10001-Rs.18000</asp:ListItem>
<asp:ListItem Value="5">Rs.18001-Rs.25000</asp:ListItem>
<asp:ListItem Value="6">Rs.25001-Rs.35000</asp:ListItem>
<asp:ListItem Value="7">Rs.35001 and Above</asp:ListItem>
</asp:RadioButtonList>

</ContentTemplate>
</asp:UpdatePanel>

</body>

code behind.......

protected void LinkButton1_Click(object sender, EventArgs e)
{
Label1.Text = (Convert.ToInt32(Label1.Text) + 1).ToString();
}


Answers (1)