Tuesday, March 8, 2011

GET VALUE FROM DROPDOWNLIST

string ContentName = e.Values["ContentName"].ToString();         

// Get Value from DropDown
int TopicID = 0;
foreach (DetailsViewRow row in ItemsDetailsView.Rows)
{
if (row.Cells[0].Text == "Topic")
{
DropDownList TopicDropDown = (DropDownList)row.Cells[1].FindControl("Topic_TopicIDList");
TopicID = int.Parse(TopicDropDown.SelectedValue.ToString());
}

}

No comments:

Post a Comment