D
David C
I have an asp.net page that contains a FormView with several controls bound
to a SqlDataSource. One of the controls is a TextBox bound to a date
column. I have the following additional properties on the TextBox:
OnTextChanged="txtDestroyed_TextChanged" AutoPostBack="true"
I expected the OnTextChanged event to fire immediately and run the postback
but it does not. The code does not run until I click the "Update" button.
Can anyone help? Below is the event code. Thanks.
Protected Sub txtDestroyed_TextChanged(ByVal sender As Object, ByVal e
As System.EventArgs)
'Run function to delete all documents in all subfile folders for
this file
Dim strText As String
strText = DBClass.DeleteFileDocuments(txtFileNumber.Text)
txtMsg.Text = strText
Try
' Use the UpdateItem method to programmatically update
' the current record in the FormView control.
fvFileCase.UpdateItem(True)
Catch ex As HttpException
txtMsg.Text = strText & "<br />The FormView control must be in
edit mode to update a record."
End Try
End Sub
David
to a SqlDataSource. One of the controls is a TextBox bound to a date
column. I have the following additional properties on the TextBox:
OnTextChanged="txtDestroyed_TextChanged" AutoPostBack="true"
I expected the OnTextChanged event to fire immediately and run the postback
but it does not. The code does not run until I click the "Update" button.
Can anyone help? Below is the event code. Thanks.
Protected Sub txtDestroyed_TextChanged(ByVal sender As Object, ByVal e
As System.EventArgs)
'Run function to delete all documents in all subfile folders for
this file
Dim strText As String
strText = DBClass.DeleteFileDocuments(txtFileNumber.Text)
txtMsg.Text = strText
Try
' Use the UpdateItem method to programmatically update
' the current record in the FormView control.
fvFileCase.UpdateItem(True)
Catch ex As HttpException
txtMsg.Text = strText & "<br />The FormView control must be in
edit mode to update a record."
End Try
End Sub
David