I,
<div>
<asp:RadioButtonList ID="rdbtnlist" runat="server" TextAlign="Right" OnSelectedIndexChanged="rdb_caltotalval" AutoPostBack="true" RepeatDirection="Vertical" RepeatColumns="1">
</asp:RadioButtonList>
</div>
II,
Binding onto radiobutton list,
rdwithoutlogin.DataSource = dtservices;
rdwithoutlogin.DataTextField="descript";
rdwithoutlogin.DataBind();
After binding , i got list like that.
UPS NEXT Day Air($11.00)
UPS UPS 3 Day Select($30.00)
UPS Ground($12.03)
FIRST OVERNIGHT($65.13)
STANDARD OVERNIGHT($18.03)
FEDEX 2 DAY AM($20)
FEDEX 2 DAY($30)
FEDEX EXPRESS SAVER($13.02)
GROUND HOME DELIVERY($30.00)
here is the problem, if i choose third one from list that is "UPS Ground($12.03)", but in loop first one got selected , i mean,
UPS NEXT Day Air($11.00) became true instead of UPS Ground($12.03) ----------------->item.selected.remaining list is false. i do not know how it is happening like that..
note: i did not write any code to mark first one to be selected in code behind before render the page.
And, OnSelectedIndexChanged="rdb_caltotalval" is firing at first time only, when i choose second time, OnSelectedIndexChanged="rdb_caltotalval" event is not fired.
protected void rdb_caltotalval(object sender, EventArgs e)
{
foreach (ListItem item in rdwithoutlogin.Items)
{
if (item.Selected)
{
string s6 = item.Text;
}
}
}
Help needed.