0
my asp.net page does not directly deal with its manipulation behind code file ( getting values from controls, checking ....), instead this is done in a different class. My problem is this , let say I have got 5 RadioButtonLists each with 2 ListItems. I want to be able to read the values of all or any items selected and save or update the values in the database as well ( also if a selection has been saved already, it should indicates so ). I am using Daset and Datatable. these are what my methods do:
this.attendanceDataTable = new DataTable();
this.attendanceDataTable.Columns.Add("MonAttendanceTypeRadioButtonList");
row["MonAttendanceTypeRadioButtonList"] = this.GetRadioButtonListAttendanceTypeText(this.AttendanceTypeText, i);
private string GetRadioButtonListAttendanceTypeText(string currentRadioButtonListTxt, int index)
{
try
{
AttendanceEntry entry = this.AttendanceEntries.GetAttendanceTypeTextEntry(currentRadioButtonListTxt, index);
if (entry != null)
{
return entry.AttendanceType.ToString();
}
}
catch
{
}
return string.Empty;
}
Get Attendances type From Rows
RadioButtonList ChoicesButtonList = new RadioButtonList();
string radiobutton = this.GetRadioButtonValueFromAttendanceText((RadioButtonList)row["MonAttendanceTypeTextRadioButtonList"]);
private string GetRadioButtonValueFromAttendanceText(RadioButtonList currTextSelected)
{
try
{
string text;
return text = currTextSelected.SelectedValue.ToString();
}
catch
{
return null;
}
}
Thanks

0
Hi Jasonb,
Please elaborate it more.
Thanks