public void FillDropDownListChoice(SPList list, DropDownList drpList, string columnName)
{
try
{
SPFieldChoice field = (SPFieldChoice)list.Fields[columnName];
drpList.DataSource = field.Choices;
drpList.DataBind();
if (columnName == Constants.FIELD_Language)
drpList.SelectedValue = "English";
}
catch (Exception ex)
{
logError("Error:In Filling Dropdown choice-" + drpList + ":", ex);
}
}
{
try
{
SPFieldChoice field = (SPFieldChoice)list.Fields[columnName];
drpList.DataSource = field.Choices;
drpList.DataBind();
if (columnName == Constants.FIELD_Language)
drpList.SelectedValue = "English";
}
catch (Exception ex)
{
logError("Error:In Filling Dropdown choice-" + drpList + ":", ex);
}
}
No comments:
Post a Comment