且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在ASP.Net MVC 3下拉读取数据

更新时间:2022-11-23 12:32:04

这取决于你正在传递的FormCollection然后只需你可以通过这个访问它的价值,你如何让你的表单值

It depends how you are getting values of your form if you are passing formcollection then simply you can access its value by this

public ActionResult MyAction (FormCollection form)
    {
        string value = form["DropDownListName"];
    }

或者你也可以通过

Or you can access it through

string value = Request.Form["DropDownListName"];