将所选文本保存到mvc4中的数据库中 [英] Saving Selected text into database in mvc4

查看:42
本文介绍了将所选文本保存到mvc4中的数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[HttpGet]
        public ActionResult Index7()
        {
            ViewBag.StoreTypeID = new SelectList(db.store_types, "StoreTypeID", "Name");



}





我以上述方式绑定下拉列表,而我需要将所选文本保存到数据库中怎么做....?


}


I am binding dropdownlist in the above way while I need to save selected text into database how to do it....?

推荐答案

试试这个链接

http://stackoverflow.com/questions/17555241/how-to-save-selected-dropdownlist-value-in-asp-net-mvc-model-for-post [ ^ ]

http://stackoverflow.com/questions/16876997/asp-net -mvc-dropdownlist-save-selectedvalue [ ^ ]



希望这有帮助
Try this links
http://stackoverflow.com/questions/17555241/how-to-save-selected-dropdownlist-value-in-asp-net-mvc-model-for-post[^]
http://stackoverflow.com/questions/16876997/asp-net-mvc-dropdownlist-save-selectedvalue[^]

Hope this helps


这篇关于将所选文本保存到mvc4中的数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆