次のTextChanged
イベントがあります-
protected void DataList1_SelectedTextChanged(object sender, EventArgs e)
{
TextBox chk = (TextBox)sender;
DataListItem item = (DataListItem)chk.NamingContainer;
TextBox txt = (TextBox)DataList1.Items[item.ItemIndex].FindControl("aTextBox");
string text = txt.Text;
WebService1 ws = new WebService1();
ws.updateA(text, newText)
}
ws.updateA
Web メソッドが必要とする場所text
は、テキスト ボックス内の元のテキストとnewText
、変更されたイベントが発生した後のテキストです。
私の問題は、メソッドが元のテキストを使用して更新する新しいテキストでデータテーブルを更新しているため、Web メソッドで使用する元のテキストと newText をどのように区別できるかということです。
SQLは -
UPDATE table SET term='" + newText + "' WHERE termText= '" + text + "'