📅  最后修改于: 2022-03-11 14:48:42.656000             🧑  作者: Mango
[BindProperty]public int SelectedTag { get; set; };public SelectList TagOptions { get; set; }public void OnGet(){ TagOptions = new SelectList(_tagService.GetTags(), nameof(Tag.TagId), nameof(Tag.TagName)); SelectedTag = 5;}