Update data table with new string

ra7al

New Member
I have the following \[code\]TextChanged\[/code\] event -\[code\] 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) }\[/code\]where the \[code\]ws.updateA\[/code\] web method needs \[code\]text\[/code\] which is the original text in the textbox and \[code\]newText\[/code\] which is the text after the changed event has been fired.My problem being how can I distinguish between the original text and the newText to use in the web method as the method is updating the data table with the new text uses the original to update?The SQL is -\[code\]UPDATE table SET term='" + newText + "' WHERE termText= '" + text + "'\[/code\]
 
Back
Top