C# 如何获取回发邮件上的下拉值

C# 如何获取回发邮件上的下拉值,c#,asp.net-mvc-3,drop-down-menu,http-post,viewmodel,C#,Asp.net Mvc 3,Drop Down Menu,Http Post,Viewmodel,我有一个下拉视图,它与视图模型关联 视图模型的属性之一: public int selectDTypeID { get; set; } 该视图有一个下拉列表: Html.DropDownListFor( model => model.selectDTypeID , new SelectList( new List<Object>{ new { value = 1 , tex

我有一个下拉视图,它与视图模型关联

视图模型的属性之一:

public int selectDTypeID { get; set; }
该视图有一个下拉列表:

   Html.DropDownListFor(
       model => model.selectDTypeID , 
       new SelectList(
              new List<Object>{ 
                   new { value = 1 , text = "Test1"  },
                   new { value = 2 , text = "Test2" },
                   new { value = 3 , text = "Test3"}
                },
              "value",
              "text"
       )
    )

我可以这样做吗?

如果您的视图是这样的强类型视图

@model AddDonationViewModel
@using (Html.BeginForm())
{
   @Html.DropDownListFor(
       model => model.selectDTypeID , 
       new SelectList(
              new List<Object>{ 
                   new { value = 1 , text = "Test1"  },
                   new { value = 2 , text = "Test2" },
                   new { value = 3 , text = "Test3"}
                },
              "value",  "text"))    

    <input type="submit" value="go" />
}

如何仍然执行提交,但将结果加载到同一页面上的div中?我的jquery类似于$('#btnSelect')。单击(function(){$('#div')。加载('/Controller/ContinueDonation');如何使类似的操作生效?(从控制器返回部分视图…)@redBarron:这是一个新问题吗?你想使用jquery表单提交并在页面中显示一些内容吗?请提供更多详细信息。如果与此无关,我鼓励你写一个新问题。
@model AddDonationViewModel
@using (Html.BeginForm())
{
   @Html.DropDownListFor(
       model => model.selectDTypeID , 
       new SelectList(
              new List<Object>{ 
                   new { value = 1 , text = "Test1"  },
                   new { value = 2 , text = "Test2" },
                   new { value = 3 , text = "Test3"}
                },
              "value",  "text"))    

    <input type="submit" value="go" />
}
[HttpPost]
public ActionResult ContinueDonation(AddDonationViewModel model)
{
  var id = model.selectDTypeID;  // You have your selected ID here
}