コード例 #1
0
ファイル: EditStory.aspx.cs プロジェクト: bwaites/fanatafics
 protected void FindCategory()
 {
     //if the selected index of ddlCategory to zero
     if (ddlCategory.SelectedIndex >= 0)
     {
             //make a new category called cat
             Category cat = new Category();
             //filter the category by fandomID of stry
             cat = cat.GetByFandomId(new Guid(stry.FandomID.ToString()));
             //set ddlCategory's SelectedIndex to the Id of cat
             ddlCategory.SelectedIndex = ddlCategory.Items.IndexOf(ddlCategory.Items.FindByValue(cat.Id.ToString()));
     }
 }