如何使用C#.net在数据库中保存文本框值 [英] How to save Textbox values in database using C#.net
本文介绍了如何使用C#.net在数据库中保存文本框值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Windows窗体中有三个文本框,我想将值保存到在文本框中输入的数据库中.
技术就是C#
I have three textboxes in windows form and I want to save values in database entered in textboxes.
Technology is C#
What should i do ??
推荐答案
首先,您确定要使用数据库吗?
其次,最简单的方法是将文本框绑定到数据源.
您可以在此处获取示例 [
First, have you decided on a database?
Second, the simplest approach would be to bind the textboxes to the data source.
You have samples here[^], based on the approach you take.
我会做这样的事情:
I would have done something like this:
private void LetsDoIt()
{
while(TestedAndOk() == false)
{
WriteSomeCode();
}
}
而且,如果您在启动/编写代码时遇到问题,我将参考msdn,cp,google.在这种情况下,我将从此文章 [
And if you are facing problems in starting/writing code, I would refer to msdn, cp, google. In this case, I would start with this article [^]on CP.
这篇关于如何使用C#.net在数据库中保存文本框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文