将值存储在数据库中 [英] storing values in database

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

问题描述

我有一个文本框,下拉列表,两个单选按钮和一个提交按钮.在我的sql数据库中,我有四列分别对应于textbox,dropdownlist,radiobutton1和radiobutton2.当我单击提交"按钮时,我应该将这些值存储到我的数据库中...

I have a textbox, dropdownlist, two Radiobuttons and a submit button . and in my sql database I have four columns corresponding to textbox,dropdownlist , radiobutton1,and radiobutton2. When I click submit button I should store these values to my database …

推荐答案

答案很简单:
The answer is simple:

  1. 设计一个数据库,该数据库实际上代表您要存储的内容
  2. 使用以下方法之一将数据输入/输出数据库:ADO.NET,Linq to Sql,Enitity Framework .*



*您将需要在Google上搜索这些示例,每个示例都有数千个示例,每个示例都有自己的优缺点.我将从ADO开始,因为其他两个都是基于ADO的.该列表仅包括.Net Framework中可用的Microsoft选项,您也可以将NHibernate添加到该列表中.



* You will need to google for these, there are 1000s of examples for each, and each has its own strengths and weaknesses. I''d start with ADO as the other two are based on it. This list includes just the Microsoft options available in the .Net Framework, you could also add NHibernate to that list.


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

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