datarow("name") = TextBox1.Text.Trim().toString()
试试

解决方案 »

  1.   

    这样写吧 datarow("name") = TextBox1.Text == null ? "" : TextBox1.Text
      

  2.   

    if textbox1.text.tostring<>string.empty then
         datarow("name")=textbox1.text
    else
         datarow("name")="Null"
    end if
      

  3.   

    datarow("name") = TextBox1.Text == null ? "" : TextBox1.Text 语法错误。
    if textbox1.text.tostring<>string.empty then
         datarow("name")=textbox1.text
    else
         datarow("name")="Null"
    end if
    是我现在正在使用的方法,比较麻烦。