Getting values from multiple radiobutttonlist on a single page using C#
I am writting an application using C# to flag out on work type whether it's been done onsite or offsite. I have programmaticaly desing the Datatable source. however I want to find a way of reading data from the SQl database and also being able to insert the values into database. this my asp.net and HTML code
jasonb BloughtPosted Mar 23, 2012, 5:20 AM
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
Satyapriya NayakPosted Mar 23, 2012, 12:17 AM
Please elaborate it more.
Thanks