本文介绍了如何使用c#asp.net在数据库中保存多个逗号分隔的文本框值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



i有一个checklistbox代码到文本框现在我想保存数据库中的文本框值,

Hello,

i have a code of checklistbox to textbox now i want to save textbox value in database,

protected void Chkl1_SelectedIndexChanged(object sender, EventArgs e)
  {
      string code = "";
      for (int i = 0; i < Chkl1.Items.Count; i++)
      {
          if (Chkl1.Items[i].Selected)
          {
              Code += Chkl1.Items[i].Text + ",";
          }
      }
      TxtCodes.Text = Code;
  }





现在,我想在数据库中保存TxtCodes.Text的所有值,但我希望逐个保存单击提交按钮上的值。



请帮帮我。



先谢谢。



Ankit Agarwal。

软件工程师



Now, i want to save all values of TxtCodes.Text in Database but i want save one by one delimeted values on Submit button clicked.

Please help me.

Thanks in Advance.

Ankit Agarwal.
Software Engineer

推荐答案


这篇关于如何使用c#asp.net在数据库中保存多个逗号分隔的文本框值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 18:41