开发者

store the form values of textboxes automatically in database [closed]

开发者 https://www.devze.com 2023-04-09 23:36 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

In c# windows application, I want to store the textbox values automaticaly into a database table as they are being entered.the database ro开发者_开发百科w should be updated as the user fills in all the textboxes. how to do it?


your question is really vague and generic. I assume you are working with Windows Forms.

Start reading some of the articles linked here: Windows Forms Data Binding

especially those about Navigate and Binding Data in Windows Forms.


In order to save it as they are changing, you can use event TextBox.TextChanged:

void textBox1_TextChanged(object sender, EventArgs e)
{
    string text = this.textBox1.Text;
    // your saving
}

Ok. If you want to save it as the input "is finished", you can use the event TextBox.Leave the same way.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号